Hartmut Henkel wrote:
Now should one just flatten a PNG with alpha so that it blends to an opaque white background (or the one provided with the image), in the way the above external processing does? Then there is no way to supply the background color if it's missing in the image.
that is no real problem since one can add backgrounds using tex; keeping the background separate has the advantage that it is less tricky with regards to image reuse (on different backgrounds); it also makes it possible to extract the image as it is afterwards
Apart from this PNG opaque blending, there is also the "Transparency" feature in PDF (PDF Ref. chapter 7). Looks complicated. Has anybody ever played with transparency, e. g. by some \pdfliteral tricks?
sure, it's part of context for years already; one should build some additional resource dicts; i wonder if we have to go that way, since i always thought that transparency of bitmaps is a characteristic of the bitmaps image itself (so, i must look into it)
Or should one stay away from all this alpha and transparency business, flag an error on PNG's with alpha (they likely look wrong anyway), and recommend that alpha needs the shown preprocessing?
preprocessing is ok, since doing that each run takes time as well; but then we must add an howto section to the manual how about transparent images on top of text
Maybe it also helps just to do nothing and wait for libpng 1.2.8..
(btw, having access to the color dict of an image would be a nice feature as well, see some post long ago) and then we don't even talk about image masks Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------