Conversation
20 tasks
nijel
added a commit
to WeblateOrg/weblate
that referenced
this pull request
Jan 2, 2019
Not sure if supporting apng is reasonable, but PNG is currently detectes as apng by Pillow, see python-pillow/Pillow#3525 Signed-off-by: Michal Čihař <michal@cihar.com>
This was referenced Jan 3, 2019
Closed
Millak
pushed a commit
to Millak/guix
that referenced
this pull request
Jan 13, 2019
I'm looking at this, as this release fixes an issue with the Django testsuite: python-pillow/Pillow#3525 * gnu/packages/python.scm (python-pillow): Update to 5.4.1.
radarhere
added a commit
to radarhere/Pillow
that referenced
this pull request
Mar 23, 2019
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.
#3501 (comment) reports that one of Django's tests is currently failing, as a call to Pillow from Django -
Image.MIME.get(image.format)- is reporting that PNG has mimetype 'image/apng'.A simple way to replicate this in just Pillow is
This is because
Pillow/src/PIL/PngImagePlugin.py
Lines 910 to 911 in e32e3fd
calls
register_mimetwicePillow/src/PIL/Image.py
Lines 2806 to 2814 in e32e3fd
So the dictionary keeps the information from the last call.
However, this problem does not just exist for PNG. It also exists for Jpeg2K and SGI. This PR solves this by changing to just one
register_mimetypecall and overriding that default by settingImageFile.custom_mimetypewhen appropriate, to be returned by theImageFile.get_format_mimetype()method.This PR will fix the Django test as it currently exists.
Presuming that the mime type should follow suit, and given that indeterminate description, my suggestion is that 'image/rgb' be used for RGB image data, and 'image/sgi' be used otherwise.
http://jhove.openpreservation.org/modules/jpeg2000/ -
The additional test image is taken from https://raw.githubusercontent.com/openpreserve/format-corpus/master/jp2k-formats/balloon.jpf, which is CC0 according to https://github.com/openpreserve/format-corpus