[NTG-pdftex] PNG inclusion progress

Taco Hoekwater taco at elvenkind.com
Mon Jan 10 16:22:54 CET 2005

Hi all,

As I said last week, i've been working on PNG inclusion, and I have
reached the point where I have a 'proof of concept' that needs checking
before I continue.

Would somebody with an AR >= 6.0 please see if this file loads OK?


This is a compile of the suite of PNG test images, as seen on

The one-pixel images do not work, but I expect that is a bug in the 
Reader (they look fine in the PDF source).

I cannot test the pdf file myself, because AR on Linux does not accept 
16-bit images yet, and I do not own any of the platforms that *are*
supported by AR 6/7 (sigh). I really need to know if the file is ok,
so I can change my C code from 'quick&dirty' to 'production' style. :-)

And while at it, I have some technical questions as well:

- The current code assumes that transparancy should always be used 
whenever it is a) present and b) the pdf version allows it (PDF-1.4).
Is this reasonable?

- There is a similar question for 16-bit color samples (PDF-1.5)

- My current code uses 1.0 for the 'screen gamma' and 0.45455 (==1/2.2) 
for the 'assumed file gamma'.  Do these 'gamma values' need 

- My code ignores bKGD (the default background color), because otherwise 
transparancy inclusion would be pointless. That is, unless someone would 
want to load a transparant PNG with the background applied but without 

- I currently ignore all color management stuff in the PNG (cHRM, sRGB, 
iCCP chunks). I do not know enough about it at the moment, and I wonder 
if anybody is immediately interested anyway? Besides, color management 
would require other changes to pdftex as well, I assume?

- (this is an unrelated question) I consider adding downsampling support 
for PNG images, but it would need a new primitive. Something like
\pdfoptionimageresolution ?

Greetings, Taco

More information about the ntg-pdftex mailing list