[XeTeX] Color changing under graphic inclusion with graphicx

Philip Taylor P.Taylor at Hellenic-Institute.Uk
Sun Jan 10 13:42:40 CET 2021


[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
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: efldiicngommjdmj.png
Type: image/png
Size: 43534 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: holnfpdoknladdcb.png
Type: image/png
Size: 9599 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: egbnjombkgmmgmfj.png
Type: image/png
Size: 8340 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fcpldhhpnobjodfk.png
Type: image/png
Size: 2852 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ilcioddcmpdlgcne.png
Type: image/png
Size: 8347 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nmeepjdgoplhhgef.png
Type: image/png
Size: 2852 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0015.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A.png
Type: image/png
Size: 340 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0016.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A-gimp.png
Type: image/png
Size: 190 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0017.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: B.png
Type: image/png
Size: 4584 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0018.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: B-gimp.png
Type: image/png
Size: 4025 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20210110/04e61e19/attachment-0019.png>


More information about the XeTeX mailing list.