Adobe Reader: unwanted color change
14 July 2008 by Stefan Kottwitz
If you include a picture within a pdf document and view it with the Adobe Reader you may notice a change of color under certain circumstances. Let’s test this png file:

This short example will be enough to produce a pdf by pdflatex:
\documentclass[a4paper,10pt]{article} \usepackage{graphicx} \begin{document} \includegraphics{test} \end{document}
You may compile by yourself or look at the pdf output. Here’s a screenshot of the Adobe Reader:

Nice blue color, but not the original one. Compare this color with a screenshot of the open source pdf viewer Evince:

Because most people use the freely available Adobe Reader it may be necessary to fix this issue. I found a solution by converting the color mode from RGB to an indexed palette using the freely available open source software GIMP. Here is the changed png file, and here the pdf file, finally the screenshot:

Using GIMP it’s possible to automate the conversion by GIMP’s batch mode using the procedure gimp-image-convert-indexed.
This topic was discussed in the LaTeX Community Forum.
This entry was posted on 14 July 2008 at 8:12 PM and is filed under Graphics. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.




9 October 2009 at 3:23 PM
The proplem occurs to me when png files are 32 bit or 64 bit rgba. Converting the png file to 24 bit rgb fixes the issue:
mogrify -format png24 *png
17 June 2010 at 4:01 AM
Color conversion is easier done with ImageMagick’s “convert” command:
convert filename +dither -colors 256 filename.png