Skip to content

psd: add PSB support #313

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

Merged
merged 3 commits into from
Jul 6, 2024
Merged

psd: add PSB support #313

merged 3 commits into from
Jul 6, 2024

Conversation

qbnu
Copy link
Contributor

@qbnu qbnu commented Jun 19, 2024

Merge #308 and #312 first. A lot of PSBs will still fail due to the filesize/dimension/pixel count limits.

The relevant differences between PSB/PSD are:


// Compression. 0 = Raw Data, 1 = RLE compressed, 2 = ZIP without prediction, 3 = ZIP with prediction.
unsigned short nCompressionMethod = ReadUShortFromFile(hFile);
ThrowIf(nCompressionMethod != COMPRESSION_RLE && nCompressionMethod != COMPRESSION_None);

unsigned int nImageDataSize = nFileSize - (26 + 4 + nColorDataSize + 4 + nResourceSectionSize + 4 + nLayerSize + 2);
unsigned int nImageDataSize = nFileSize - (26 + 4 + nColorDataSize + 4 + nResourceSectionSize + nLayerSizeBytes + nLayerSize + 2);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eek that's lots of offsets, is 26 part of the header?

@sylikc sylikc added enhancement New feature or request format support Related to add/remove/change of a specific format support. labels Jun 22, 2024
@sylikc sylikc merged commit efd55a1 into sylikc:master Jul 6, 2024
4 checks passed
@sylikc
Copy link
Owner

sylikc commented Jul 6, 2024

i read through all the code, and you really make this look easy. I know it's not... since I really can't figure out the formats stuff, but I appreciate all the updates to improve JPEGView! thanks a bunch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request format support Related to add/remove/change of a specific format support.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants