Skip to content
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

Max Compatibility Layer #17

Open
iceman opened this issue Aug 1, 2013 · 3 comments
Open

Max Compatibility Layer #17

iceman opened this issue Aug 1, 2013 · 3 comments

Comments

@iceman
Copy link

iceman commented Aug 1, 2013

I love this project. Thank you. Is there any way to detect if a max compatibility layer is saved into the file?

@meltingice
Copy link
Member

What do you mean by a "max compatibility layer"?

@iceman
Copy link
Author

iceman commented Aug 2, 2013

I'm referring to the composite of all the layers that photoshop saves if you check the box upon saving or in the preferences. It's very useful for generating a preview of a very complex file with a command line linux graphics tool. When complex files don't include this layer, often they just have a placeholder image at that position and the only way to get any sort of preview from the file is to extract the custom thumbnail. So it would be nice if we could tell if the layer was there or not. Photoshop can tell and once the file is initially saved with/without it, it won't ask again.

This phantom layer is discussed in the second paragraph here:
http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/PhotoshopFileFormats.htm#50577409_pgfId-1031423

@meltingice
Copy link
Member

Ah, right. If it were me, I would put that flag in the PSD Resources section.

This is pretty interesting. I saved a copy of the example PSD and disabled compatibility mode as the only change. I then compared the resources in each since I noticed they differed.

nocompat.resources.map { |r| r['id'] } - psd.resources.map { |r| r['id'] }
#=> [1010]

The only resource that is present in the non-max compatibility version and not the other has the ID 1010. Strangely, this is marked as the "Background Color" resource. Thus, I'm not sure if this is a clear indication of compatibility mode, but it's a start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants