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

Projects
None yet
3 participants
@ruda
Contributor

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.

Save image optimized otherwise save image without enhancement
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

This comment has been minimized.

Show comment
Hide comment
@fabiomcosta

fabiomcosta Sep 22, 2011

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

Member

fabiomcosta commented Sep 22, 2011

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

Merge pull request #46 from ruda/master
PIL Engine: save image optimized otherwise save image without enhancement

@heynemann heynemann merged commit 209129a into thumbor:master Sep 22, 2011

@ruda

This comment has been minimized.

Show comment
Hide comment
@ruda

ruda Sep 24, 2011

Contributor

Thank you.

Contributor

ruda commented Sep 24, 2011

Thank you.

@heynemann

This comment has been minimized.

Show comment
Hide comment
@heynemann

heynemann Sep 25, 2011

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)

Member

heynemann commented Sep 25, 2011

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