[texhax] Transparency or reduced saturation using Graphicx ?

Philip TAYLOR P.Taylor at Rhul.Ac.Uk
Fri Mar 6 17:23:09 CET 2009

My thanks to all who made suggestions for tackling this problem.
My first thought was to try Ivan Ramos Pagnossin's idea :

> If I understood what you need, than the following code may help you (you 
> need the package tikz):
> \begin{figure}
>   \begin{*tikzpicture*}
>     \node [opacity=0.15] {\includegraphics[...]{...}};
>   \end{*tikzpicture*}
> \end{figure}

but I failed to get it to work in the context in which I need it.
I reproduce a fragment of the original (below), where it will
be seen that I need the resulting image in an \hbox for further
manipulation and placement :

     \ifdim #2 pt > 0 pt \scaledheight = #2\targetheight \scaledwidth = #2\targetwidth \fi
     \setbox 0 = \hbox {\includegraphics [height = \scaledheight, width=\scaledwidth, clip=true, keepaspectratio=true]{\Prefix/#3-#4.pdf}}%
     \setbox 0 = \hbox  {\href {\Prefix/#3-#4.pdf}{\box 0 }}%
     \ifdim \wd 0 < \targetwidth \wd 0 = \targetwidth \fi
     \drop = \ht 0
     \advance \drop by -2 ex
     \vrule height \baselineskip depth \dp \strutbox width 0 pt
     \smash {\lower \drop \hbox spread 1 pc {\box 0 \hss}}%

I tried to work out from the TeXdoc documentation on TikZ/PGF
what sort of an object

 >   \begin{*tikzpicture*}
 >     \node [opacity=0.15] {\includegraphics[...]{...}};
 >   \end{*tikzpicture*}

should yield, but regret to say that I failed :-(  I will now
try  some of the other suggestions (I was hoping to find one
that would allow me to manipulate the image during TeX processing,
which is why I started with the TikZ approach, but if that is
not possible then off-line pre-processing is a viable option).

** Phil.

More information about the texhax mailing list