TeXblog

 Typography with TeX and LaTeX

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:

pdf color test original

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:

pdf color test Adobe Reader

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

pdf color test 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:

pdf color test Adobe Reader

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.

2 responses about “Adobe Reader: unwanted color change”

  1. Karsten said:

    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

  2. George said:

    Color conversion is easier done with ImageMagick’s “convert” command:

    convert filename +dither -colors 256 filename.png

Leave a Reply