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

Raise SyntaxError specific to JP2 #8146

Merged
merged 2 commits into from
Jun 26, 2024
Merged

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

Yay295 and others added 2 commits June 25, 2024 10:50
…pty string

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
@hugovk hugovk merged commit 2756cd5 into python-pillow:main Jun 26, 2024
56 checks passed
@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