[texhax] [NTG-pdftex] \pdfximage : is there a transparency attribute or method ?

Reinhard Kotucha reinhard.kotucha at web.de
Tue Jan 4 20:27:58 CET 2011

On 4 January 2011 Philip Taylor (Webmaster, Ret'd) wrote:

 > I am attempting to incorporate
 > 	http://thai-an.co.uk/Resources/Graphics/thai-an-logo-no-phone.png
 > as a background image in PdfTeX, and of course it is
 > far too saturated to use as-is.  While I could manipulate
 > it in Photoshop or similar, I wonder if there is a more
 > direct way whereby I can specify (say) its transparency
 > in PdfTeX so as to effectively reduce its saturation ?

Hi Phil,

$ wget http://thai-an.co.uk/Resources/Graphics/thai-an-logo-no-phone.png
--2011-01-04 19:37:39--  http://thai-an.co.uk/Resources/Graphics/thai-an-logo-no-phone.png
Resolving thai-an.co.uk...
Connecting to thai-an.co.uk||:80... failed: Connection timed out.

--2011-01-04 19:40:49--  (try: 2)  http://thai-an.co.uk/Resources/Graphics/thai-an-logo-no-phone.png
Connecting to thai-an.co.uk||:80... failed: No route to host.

Same results with


However, you can probably apply ICC profiles, but this looks
non-trivial.  The IIC file in the pdftex samplepdf directory is a
binary file.  Maybe it's possible to apply ICC data in ASCII format,
but I just found a simpler solution:

  sam2p thai-an-logo-no-phone.png thai-an-logo-no-phone.eps

In the EPS file, immediately after the lines beginning with %%, add
the line

{ .33 exp } dup dup currenttransfer setcolortransfer

and then run

  epstopdf thai-an-logo-no-phone.eps

I get acceptable results with the JPG file I used for testing, but
you probably have to experiment with the transfer function.

The first occurrence of the function denotes the transfer function for
the red part of the image.  Because we need the same function for all
three colors, we simply duplicate it twice on the stack.


Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the texhax mailing list