Take the 2-minute tour ×

Example of the problem.

With this Lab/TIF image (amongst others):


Running convert file1.tif file1.jpg results in this distorted result when run on my server, which is Ubuntu 12.04 LTS. This is running ImageMagick 6.6.9-7:


The same command run locally on my Mac, does not have the same issue. I've tested this locally with the version of ImageMagick installed by HomeBrew (6.8.0-10) as well as 6.6.9-7 manually compiled to compare as closely with the server as possible.

I had suspected that it might have been the version of libtiff, as the Mac has 4.0.3, and the server has 3.9.5, however I've just run a test on a fresh Ubuntu install with latest ImageMagick, and libtiff 3.9.5, and the problem is still present.

Anything obvious?

share|improve this question

1 Answer 1

Running tiffinfo states that the colorspace of "file1.tif" is CIELab. Ubuntu's ImageMagick, installed through apt-get, will have Lab -- but not CIELab. This can be confirmed by running the following command between the two systems.

 identify -list colorspace

I'm not exactly sure what the difference between the two colorspaces are (something about chromatic value,) but that would contribute to the illumination your experiencing.

A solution would be to install ImageMagick from source on you Ubuntu server/machine (which will include CIELab). Other people have experienced related issues; which, resolved after building from source.

  • With apt-get
    • Uninstall ImageMagick
    • Install the development packages for each dependent library (ie libtiff-dev)
  • Follow ImageMagick's documentation


You can also explicitly set the colorspace with the -set option. Also add the -verbose options to evaluate what ImageMagick is doing.

convert -verbose file1.tiff -set colorspace CIELab -colorspace sRGB file1.jpg
# Output
file1.tif TIFF 1451x1865 1451x1865+0+0 8-bit CIELab 1.326MB 0.110u 0:00.109
file1.tif=>file1.jpg TIFF 1451x1865 1451x1865+0+0 8-bit sRGB 411KB 0.820u 0:00.840
share|improve this answer
Thanks. That makes sense. I'll give that a go today. –  Colin Aug 21 '13 at 8:14
Surprisingly, that appears to not have worked. I've installed libtiff8-dev (which depends on libjpeg8-dev) & installed ImageMagick from source. identify -list colorspace correctly shows CIELab. It has made a difference though as now the image is differently changed. I'm feeling very Warhol. cl.ly/image/0T1L0T180E1T –  Colin Aug 21 '13 at 9:02
Odd. Seems to work for me with libtiff4-dev. Perhaps you will need to be specific about the colorspace conversion with the convert utility. I'll update the answer with an example. –  emcconville Aug 21 '13 at 13:40
Sorry, it is indeed libtiff4-dev I have installed. Are you also testing on Ubuntu? I've tried it on a Fedora install and it's worked correctly (with ImageMagick installed via. Yum). I get a few differences in output - not sure if relevant - pastebin.com/raw.php?i=iZU7jN0k –  Colin Aug 21 '13 at 15:48
Additionally after noticing the issue on the server, I've been testing on a virtual machine, so it's not isolated to the one box. –  Colin Aug 21 '13 at 15:49

Your Answer


