[l2h] Re: Problems in PNG generation

Ross Moore Ross Moore <ross@ics.mq.edu.au>
Tue, 21 Sep 1999 10:30:47 +1000 (EST)


[Charset iso-8859-1 unsupported, filtering to ASCII...]
>  Formerly, I was not able to build PNG images due to a bug in pnmtopng
> provided in the linux distribution RedHat 5.2
> 
> But I got a source (suppoedly recent, from suse) which I finally
> succeeded to compile, so that is yields an image, instead of crashing.
> 
> The new problem is that the PNG has a gray background, while the GIF is
> transparent. Of course I use the same pstoimg routine, just changing the
> configuration file (99.2 revision 1.29)
> 
> ==> Is that grey background with PNG a bug, or a "feature"?
> -- 
The fact that it is grey is a "feature".
That fact that it is not also transparent is either a "bug"
or a configuration error. I don't know which, sorry.

One workaround is easy:
include   \usepackage{color}\pagecolor{white}
in all your LaTeX documents that have images.

Alternatively, set   $LATEX_COLOR = "\\pagecolor{white}";
in a configuration file.

That will set the background to be white, which may then become
transparent automatically. But doing this loses the enhanced
anti-aliasing provided by the grey background.

There is probably another fix available, using a variable for pstoimg.
I'd have to look at the code to check this.


There is (usually)  no such problem with .gif images, as there are
reliable routines to determine which color is the background,
in order to set it to be transparent.


Hope this helps,

	Ross Moore

> 
> ------------------------------------------------------------------------
>   Daniel Taupin, Physique des Solides, Univ. Paris-Sud, 91405 ORSAY
>   E-mail= mailto:taupin@lps.u-psud.fr
>   T_l: (33)1.69.15.60.79, Fax: (33)1.69.15.60.86, home/fax:
> (33)1.60.10.26.44
> 
> ------------------------------------------------------------------------