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

PIL Engine: save image optimized otherwise save image without enhancement #46

Merged
merged 1 commit into from Sep 22, 2011

Conversation

ruda
Copy link
Contributor

@ruda ruda commented Sep 21, 2011

Some large JPEG images (say 3000x3000) would trigger an IOError
exception when PIL engine is storing the image. The solution is to
increase ImageFile.MAXBLOCK. This modification allows to save the image
without enhancement when it is bigger than ImageFile.MAXBLOCK, so the
image is stored anyway, but it logs a message in order to hint one to
increase the value of ImageFile.MAXBLOCK for fine tuning.

Some large JPEG images (say 3000x3000) would trigger an IOError
exception when PIL engine is storing the image. The solution is to
increase ImageFile.MAXBLOCK. This modification allows to save the image
without enhancement when it is bigger than ImageFile.MAXBLOCK, so the
image is stored anyway, but it logs a message in order to hint one to
increase the value of ImageFile.MAXBLOCK for fine tuning.
@fabiomcosta
Copy link
Member

Great! Looks fine to me since the validation for image size is done before these lines. Looks safe and will improve the successfully responses.

Thank you @ruda

heynemann added a commit that referenced this pull request Sep 22, 2011
PIL Engine: save image optimized otherwise save image without enhancement
@heynemann heynemann merged commit 209129a into thumbor:master Sep 22, 2011
@ruda
Copy link
Contributor Author

ruda commented Sep 24, 2011

Thank you.

@heynemann
Copy link
Member

Not at all! Thank you! Whenever you need any help, just let us know. And
keep the patches coming! :)

Cheers,
Bernardo Heynemann

On Sat, Sep 24, 2011 at 7:27 PM, Rud Moura <
reply@reply.github.com>wrote:

Thank you.

Reply to this email directly or view it on GitHub:
#46 (comment)

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.

None yet

3 participants