Last modified: 2011-04-30 01:20:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T26545, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24545 - ImageMagick generated Thumbnails get messed up (wrong colors) in some cases
ImageMagick generated Thumbnails get messed up (wrong colors) in some cases
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.15.x
All Linux
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-26 11:03 UTC by D.Hiepler
Modified: 2011-04-30 01:20 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Generated with: "convert -background white -size 120 testcase.jpg -thumbnail '120x' -depth 8 -sharpen '0x0.4' thumb_wrong.jpg (10.19 KB, image/jpeg)
2010-07-26 11:03 UTC, D.Hiepler
Details
Generated with: "convert -background white -size 120 testcase.jpg -thumbnail '120x' -sharpen '0x0.4' thumb_right.jpg" (9.20 KB, image/jpeg)
2010-07-26 11:05 UTC, D.Hiepler
Details

Description D.Hiepler 2010-07-26 11:03:01 UTC
Created attachment 7592 [details]
Generated with: "convert -background white -size 120 testcase.jpg -thumbnail '120x' -depth 8 -sharpen '0x0.4' thumb_wrong.jpg

I've found that ImageMagick/convert generates messed-up thumbnails from some kinds of images (mainly truecolor, high-resolution but other kinds may be affected as well).
The thumbnails show wrong color portions that might result from wrong (or no) dithering. I tracked down the problem to the "-depth 8" parameter to convert in "includes/media/Bitmap.php", without it, everything looks just fine.

A quick possible solution would be, to make this parameter optional. Maybe a dedicated analysis of this bug could result in checking the uploaded image-properties and selectively applying the "-depth 8" option to images where it doesn't harm thumbnail generation.

Hope that helps.
Comment 1 D.Hiepler 2010-07-26 11:05:41 UTC
Created attachment 7593 [details]
Generated with: "convert -background white -size 120 testcase.jpg -thumbnail '120x' -sharpen '0x0.4' thumb_right.jpg"
Comment 2 D.Hiepler 2010-07-26 11:21:16 UTC
This is the original file, the thumbnails were generated from: http://localhostr.com/files/431def/testcase.jpg
Comment 3 Derk-Jan Hartman 2010-07-26 15:38:17 UTC
Tested this on Wikipedia. The problem does not occur on Wikipedia, which indicates that this most likely depends on the version of ImageMagick that you have installed. Consider upgrading to the latest and greatest...

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links