# [pdftex] bug with included transparent graphics

James Quirk jjq at hmx.galcit.caltech.edu
Sun Dec 30 17:00:42 CET 2007

On Sat, 29 Dec 2007, Martin Schröder wrote:

> 2007/12/29, Jim Diamond <Jim.Diamond at acadiau.ca>:
> > yes, the bug you referred to above may be the same issue, but I have
> > submitted a new bug report anyway.
>
> Thanks. Even if we fixed the pdf bug (haven't checked yet, sorry),
> somethings still fishy in the png case. Maybe a bug in AR; I'll try
> our contact at Adobe, but don't expect an answer this year. :-)
I've reduced the problem down to the following test:

\documentclass{article}
\pdfcompresslevel0
\usepackage{graphicx}
\usepackage{xcolor}
\begin{document}
%\pagecolor[HTML]{000000}  % page 2 is #000000
%\pagecolor[HTML]{101010}  % page 2 is #000000
%\pagecolor[HTML]{202020}  % page 2 is #000000
%\pagecolor[HTML]{303030}  % page 2 is #000000
%\pagecolor[HTML]{404040}  % page 2 is #000000
%\pagecolor[HTML]{474747}  % page 2 is #000001
%\pagecolor[HTML]{484848}  % page 2 is #000105
%\pagecolor[HTML]{505050}  % page 2 is #021518
%\pagecolor[HTML]{606060}  % page 2 is #253A3B
%\pagecolor[HTML]{707070}  % page 2 is #475C5E
%\pagecolor[HTML]{808080}  % page 2 is #677D7D
%\pagecolor[HTML]{909090}  % page 2 is #829796
%\pagecolor[HTML]{A0A0A0}  % page 2 is #9AADAB
%\pagecolor[HTML]{B0B0B0}  % page 2 is #ACBDBC
%\pagecolor[HTML]{C0C0C0}  % page 2 is #C0CDCB
%\pagecolor[HTML]{D0D0D0}  % page 2 is #D1DBDB
%\pagecolor[HTML]{E0E0E0}  % page 2 is #E3EBE9
%\pagecolor[HTML]{F0F0F0}  % page 2 is #F2F6F5
%\pagecolor[HTML]{F8F8F8}  % page 2 is #F9FAFA
%\pagecolor[HTML]{FFFFFF}  % page 2 is #FFFFFF
\mbox{}
\newpage
\includegraphics{trans.png}
\pagestyle{empty}
\end{document}

where trans.png is a green square (#00ff00) with a transparent cutout, see
the attached 340 byte file. I was hoping to see some correlation between
the given page color and the erroneous page color seen on page 2, where
the transparent image lives. But I can't spot it. The colors I give
for page 2 were observed with both Linux AR8.1.x and Linux AR7.0.x .

After looking inside the PDF I generate at my end (I'm using pdftex
1.40.3-2.2) it looks like the /SMask for the png image is affecting the
whole page. For instance, one can comment out "/Im1 Do" from the page
stream, to suppress the png image, and the color for page 2 is still
affected. On the other hand, if the /SMask is commented out of
the png's /XObject then the png is drawn without transparency (the cutout
appears as a red square) and the color for page 2 is correct.
I havn't yet fully digested the PDF Reference to know whether
AR is at fault or pdftex is generating erroneous PDF.
Martin do you have a feel for which it is?

James

>
> Best
>    Martin
> _______________________________________________
> pdftex mailing list
> pdftex at tug.org
> http://tug.org/mailman/listinfo/pdftex
>