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

fix: flag used for locked/visible layers #15

Closed
wants to merge 1 commit into from
Closed

fix: flag used for locked/visible layers #15

wants to merge 1 commit into from

Conversation

stephenlacy
Copy link

@stephenlacy stephenlacy commented Jun 7, 2022

This fixes the flag used for locked vs visible layers, I have a basic psd (PS CC latest) with three layers, one locked, one visible, one not visible. The flags returned look like the following:


Locked layer flags:  00001001 
Visible layer flags: 00001000 
Hidden layer flags:  00001010 

Currently it's looking for the visible flag in position 7, rather than 6.

@stephenlacy stephenlacy mentioned this pull request Jun 8, 2022
@pastelmind
Copy link
Collaborator

pastelmind commented Jun 13, 2022

This doesn't match corroborates Adobe's PSD file format docs:

Flags:
bit 0 = transparency protected;
bit 1 = visible;
bit 2 = obsolete;
bit 3 = 1 for Photoshop 5.0 and later, tells if bit 4 has useful information;
bit 4 = pixel data irrelevant to appearance of document

...but its certainly possible (or probable) that the docs are outdated or inaccurate. Oops, I need to wake up before writing replies.

We did plan to eventually rewrite the bit parsing logic, and we'll investigate if we can fix this along the way.

@pastelmind
Copy link
Collaborator

Closing in favor of #34

@pastelmind pastelmind closed this Jun 20, 2022
pastelmind pushed a commit that referenced this pull request Jul 13, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants