Skip to content

Handle PSD files that do not have a readable Global Layer Mask Info block after LayerInfo.#117

Open
greymd wants to merge 4 commits intowebtoon:mainfrom
greymd:main
Open

Handle PSD files that do not have a readable Global Layer Mask Info block after LayerInfo.#117
greymd wants to merge 4 commits intowebtoon:mainfrom
greymd:main

Conversation

@greymd
Copy link
Copy Markdown

@greymd greymd commented Apr 5, 2026

Some PSD writers, including a Procreate-generated sample I tested, appear to omit this block and leave only padding. The previous
implementation always read a 4-byte length field there, which caused a RangeError.

This PR:

  • treats the block as empty when it is not readable
  • guards global additional layer info parsing against truncated tails
  • adds regression coverage, including a Procreate fixture

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.

1 participant