[Just realised that the XeTeX list should have been cc'd, so doing so now and will forward Paulo's original images as attachments]

Philip Taylor wrote:
Ulrike Fischer wrote:
I can't reproduce your problem with the files you provided.

How do you compile? Which TeX-System do you have? And which viewer
do you use to view the pdf? Can you provide the pdf you get?


For me (Windows 7 64-bit Enterprise, TeX Live 2020), PdfLaTeX does /not/ shew the problem whilst XeLaTeX does.  The artifacts are more visible in the TeXworks previewer than in Adobe Acrobat CC, but are nonetheless visible in the latter.

/Philip Taylor/
/--------/
I have (a couple) of PNG images with a background color of, for example, RGB(80,64,83), that when placed on a page of the same background color with {graphicx} -- they show a distinct tonality against the background -- which is of the same color.

````
\documentclass{report}

\usepackage{xcolor}
\definecolor{bgcolor}{RGB}{80,64,83}

\usepackage{graphicx}
\pagestyle{empty}

\begin{document}

\pagecolor{bgcolor}
\includegraphics[width=0.5\textwidth]{A.png}
\quad
\includegraphics[width=0.5\textwidth]{B.png}

\medskip

\includegraphics[width=0.5\textwidth]{A-gimp.png}
\quad
\includegraphics[width=0.5\textwidth]{B-gimp.png}

\end{document}
````

Checking the colors in the included files one can see they have changed from (80,64,83) to (71,56,74) in the included images.

Just opening the images on `GIMP` and exporting it as-is with the default choices of

export-settings.png

fixes everything and the new inclusion now gets the exact color they were set to begin with, the same as the background, as shown below (second line).


together.png

What is that TeX needs from the PNG's to preserve their color when included in a page?

Paulo Ney


PS. For experimentation here are the same images, before and after opening with GIMP.




B-gimp.png


A-gimp.png


B.png


A.png


Reply via email to