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

Determining size in EpsImagePlugin #5

Closed

Conversation

radarhere
Copy link

Suggestion for python-pillow#6879

Reverts a change that seems unnecessary. I don't think _size is ever None apart from this, so it would be better not to change the type of it if we don't have to.

@Yay295
Copy link
Owner

Yay295 commented Jan 28, 2023

_size can be None if the BoundingBox header exists but is invalid, and the ImageData comment doesn't exist.

With your change, if the BoundingBox header is invalid but ImageData exists, _size would be set but box wouldn't.

Setting _size to tuple() at the start instead of None works if you want to keep the data type the same.

@Yay295
Copy link
Owner

Yay295 commented Jan 28, 2023

I've added a test for that situation: c71fff2

@Yay295 Yay295 closed this Mar 15, 2023
@radarhere radarhere deleted the eps_plugin_perf_size branch September 20, 2023 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants