Adding option to specify/keep quantization tables when saving to JPEG - issue #42#77
Merged
aclark4life merged 1 commit intopython-pillow:masterfrom Mar 8, 2013
Merged
Conversation
Member
|
Thanks! |
|
I am a beginner to pillow and python. I am trying to specify a present quantization table, but when i try the following code: im1=Image.open('lena.jpg')
qt1=im1.quantization
print 'The qtable of lena.jpg'
print qt1
im2.save("lena1.jpg", qtables="low")
im3=Image.open('lena1.jpg')
print 'The qtable of lena1.jpg'
qt3=im3.quantization
print qt3but the output of qt3 and qt1 are same. means it is not loading the preset value "low". Why? |
Member
|
@savyan This type of question is best asked/answered on stackoverflow with the python and python-imaging-library tags e.g. http://stackoverflow.com/search?q=pil |
|
thank you for the guidance. |
Contributor
|
|
On Friday 05 July 2013 06:00 PM, David Schmidt wrote:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Alex,
Basically what need to be test is:
im.quantization), then save this image with:Reopen this new image and compare the quantization table to the first one, they should be identical.
Sorry for not having proper tests.