-
-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] - Layer Masks #391
Comments
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! |
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) |
Here you go: example.psd.zip |
Relates to #391. Thank you to @ImportTaste for filing the original bug report. This is the first of several commits aimed at successfully round-tripping layer group masks from PSD files. In this first commit, PhotoDemon can now successfully retrieve group masks, and if a debug constant is enabled, it'll even load them as the pixel data for the "dummy" layer group layers we create. (This obviously causes the composite image to display weirdly, but it's very helpful to me so I can see what's happening with a given group.) My next task is to "tag" group layers with mask data (as an optional add-on) and ensure that data persists for the life of the target group. The final task will then be to figure out how to export the mask in a PSD-compatible way.
Relates to #391 Masks are not persisted yet, but this at least gives me a way to tag layers with mask data.
Next up: round-tripping that data back out to PSD! Relates to #391
Relates to #391 PhotoDemon can now read layer group masks from PSD files, cache the masks throughout other edits (including rearranging group markers), then correctly write all group mask(s) back out to PSD later. I've tested a variety of group masks implemented in various ways, and they all work nicely against Photoshop CS2 (the latest version I have available for testing; external testing help against CC would be most welcome).
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 |
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.
The text was updated successfully, but these errors were encountered: