Ticket #14255 (confirmed Bug)
Broken scaling of GIF images
Reported by: | mikkel@… | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.x |
Component: | General | Version: | 4.4 |
Keywords: | plone.app.imaging, thumbnail, scale, GIF | Cc: |
Description
There seems to be an issue with the scaling of palleted GIF images in plone.app.imaging 1.0.10 (at a quick glance, the issue doesn't appear to be been fixed in 1.1.1) when thumbnails are generated. I'm far from experienced with image handling, but the problem seems to be an unnecessary conversion of the image to RGBA in line 98 of monkey.py before the mode is converted back to P in line 106. Removing this unnecessary conversion solves the problem. Note that the same code seems to be present in other products as well.
Original image: http://imgur.com/qzIxD82,UbqdusQ,r5GGdkq#0
Broken thumbnail: http://imgur.com/qzIxD82,UbqdusQ,r5GGdkq#1
Thumbnail after fix: http://imgur.com/qzIxD82,UbqdusQ,r5GGdkq#2