Skip to content

Conversation

@Yay295
Copy link
Contributor

@Yay295 Yay295 commented Jun 17, 2024

With this change the _parse_codestream and _parse_jp2_header methods never return None for the size or mode.

@radarhere
Copy link
Member

I don't see any problems with this change, as it is mirroring the existing pattern of raising an error from inside _parse_jp2_header.

Your motivation here is just to let the behaviour of these two methods match each other more closely, as a code cleanup task, yes?

@radarhere radarhere changed the title Raise SyntaxError when parsing JP2 codestream rather than returning None Raise SyntaxError specific to JP2 Jun 18, 2024
@Yay295
Copy link
Contributor Author

Yay295 commented Jun 18, 2024

Yes

@hugovk hugovk merged commit 2756cd5 into python-pillow:main Jun 26, 2024
@Yay295 Yay295 deleted the jp2_parsing branch June 26, 2024 13:20
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.

3 participants