- copy your image (
- make a new document-sized pure-black layer behind it
- group the black layer and yor image together
- add mask to the group
- enter mask edit mode (
alt+clickon the mask icon/thumbnail)
- paste your image in the mask (b/w) and then invert it.
- save it as a 24-bit transparent PNG