Page MenuHomePhabricator

Black/striped thumbnails of CMYK JPEGs
Closed, ResolvedPublic

Description

See the original upload of http://commons.wikimedia.org/wiki/File:Wikipedia_parel_poster_A1.jpg

The thumbnails for this upload rendered in a striped black. This is most likely caused by ImageMagick using the EXIF colorspace by default. In the case of this image, the EXIF colorspace is set as "uncalibrated" which probably makes IM default to RGB, whereas this is a CMYK image. The ICC however notes "color mode: CMYK, Color profile: ISO Coated v2 (ECI)'

Intermediary solution is to convert the image using a graphics program from color mode CMYK to RGB and saving it with colorprofile sRDB for instance.


Version: 1.17.x
Severity: minor

Details

Reference
bz24854

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:01 PM
bzimport set Reference to bz24854.
bzimport added a subscriber: Unknown Object (MLST).

This version is fixed with a newer ImageMagick or newer libjpeg version.

I run:
Version: ImageMagick 6.5.9-9 2010-05-05 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC

libjpeg (7.dylib)

which does not have this problem.

Actually ImageMagick was just upgraded a few days ago. Previously it discarded the color profile from thumbnails, now they are preserved. Perhaps this problem was caused by the fact that the EXIF and ICC color settings did not agree with each other.

I was referring to the ImageMagick used by our thumbnailing servers in case it was not clear.

No, this upload was from today. It is not related to our upgrade.

There might be other causes of course. It could be an error in libjpeg or in the assembly code used by imagemagick, and thus be specific to the platform. a 32bit vs 64bit issue. Will require further testing I guess.

  • Bug 25921 has been marked as a duplicate of this bug. ***
  • Bug 27635 has been marked as a duplicate of this bug. ***
  • Bug 29046 has been marked as a duplicate of this bug. ***
  • Bug 35684 has been marked as a duplicate of this bug. ***

Note the last bug i duped was actually about YCCK jpegs, not CYMK, but its essentially the same issue.

  • Bug 37956 has been marked as a duplicate of this bug. ***

I created a https://commons.wikimedia.org/wiki/Category:Bug_24854_fixed_temporarily , where I stored all the files wich got temporarily fixed. Just to keep order.

nneonneo wrote:

*** Bug 38815 has been marked as a duplicate of this bug. ***

nneonneo wrote:

From my brief analysis over at Bug 38815, I've noticed that the images are converted to 1-bit black when the thumbnail has width less than 85% of the original, exacerbating this problem. So, it is probably more noticeable on smaller thumbnails.

Furthermore, the effect is browser-dependent. Some browsers (and OSes) will render the larger (>= 85% width) thumbnails fine, but others (in my testing, Safari and OS X) actually invert the colours in the thumbnail (but not the original) for some reason. The likely suspect is missing or incorrect ICC profiles.

(In reply to comment #15)
Thanks for having a detailed look at this problem. Rendering in Firefox (at least 14.0.1) and Opera (at least 12.00) on Ubuntu 12.04 is fine. IE8 on Win7 does not display any thumbnail of those CMYK images.

  • Bug 36346 has been marked as a duplicate of this bug. ***

Was there any update regarding the image scalers? The black/striped artefacts seem to have disappeared now... See example at: https://commons.wikimedia.org/wiki/File:Photo_of_Gail_Dolgin.jpg

Nevertheless the thumbnails of cmyk-files (at least of the example file I mentioned above) have about 100 times the size of "normal" rgb thumbnails.

See:

It does seem indeed as if this issue is now fixed after purging the affected images. Where thumbs are not fixed, it seems this is because of bug 41130