PhotoDemon icon indicating copy to clipboard operation
PhotoDemon copied to clipboard

[Feature request] - Layer Masks

Open God-damnit-all opened this issue 3 years ago • 4 comments

Layer masks are grayscale representations of transparency that are applied to either layers or layer groups. White represents visible, black is completely invisible, and grays are in between.

https://helpx.adobe.com/photoshop/using/masking-layers.html

Worth mentioning in Photoshop I often use layer masks on groups, so if PhotoDemon could somehow take layer masks applied to the 'Group start' layer when exporting (at least until PhotoDemon has real layer groups), that would be appreciated.

God-damnit-all avatar Mar 01 '22 20:03 God-damnit-all

Hello @ImportTaste . Thank you for filing this issue. It is a great suggestion.

Whenever it's convenient, can you attach a PSD file with a mask attached to a layer group? That would really help me in testing.

Many thanks!

tannerhelland avatar Mar 02 '22 14:03 tannerhelland

These are also part of Paint Shop Pro; in PSP7 the mask is attached directly to each layer. In PSPX (8, 9, maybe?) masks can be used on groups (as @ImportTaste mentions)

Kroc avatar Mar 02 '22 21:03 Kroc

Hello @ImportTaste . Thank you for filing this issue. It is a great suggestion.

Whenever it's convenient, can you attach a PSD file with a mask attached to a layer group? That would really help me in testing.

Many thanks!

Here you go: example.psd.zip

God-damnit-all avatar Mar 02 '22 23:03 God-damnit-all

Hello @ImportTaste . The latest PhotoDemon nightly builds are now able to successfully round-trip layer group masks from PSD files. Your test image was very helpful for getting this project underway - thank you again for sending it.

I have aggressively tested the new PhotoDemon code against many different group masks images coming from Photoshop CS2. I don't expect issues in other PS versions, but if you encounter any unexpected results, please let me know.

Also - group masks will persist through nearly all edits in PhotoDemon (including adjustments, effects, rearranging layers and group markers, etc) - but actions that affect image or layer sizes like Image > Resize will not resize any layer group masks just yet. I will work on adding that level of group mask support in the coming months.

tannerhelland avatar Mar 30 '22 19:03 tannerhelland