Skip to content

Conversation

@radarhere
Copy link
Member

#6528 (comment) has pointed out that by calling load() at the beginning of thumbnail(), the JPEG draft() method wouldn't perform any operations.

thumbnail starts by calling the load function. Doesn't this defeat the purpose of the draft method ?

self.load()

#6186 added the line because load() may change the size of the image, and so change thumbnail() size calculations.

This PR rearranges the code to suit both scenarios, so that load() is called before size calculations unless draft() returns a result.

@hugovk hugovk merged commit 9b53e3b into python-pillow:main Sep 11, 2022
@radarhere radarhere deleted the thumbnail branch September 11, 2022 22:22
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.

2 participants