[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dvipng] Re: dvipng color trouble

From: Jan-Åke Larsson
Subject: [Dvipng] Re: dvipng color trouble
Date: Thu, 10 Jan 2008 10:20:37 +0100
User-agent: Thunderbird (X11/20070830)

mitcho (Michael 芳貴 Erlewine) wrote:
> Thank you for your great work on dvipng. I can't remember if I tried to
> contact you previously when I encountered this issue, but I just posted
> about a rare coloration bug in dvipng... I would love to know what you
> think:
> http://mitcho.com/blog/2007/12/28/dvipng-color-trouble/

The DVI on your webpage works for me (dvipng >= v1.8), but I have been
able to reproduce your behaviour by giving the --palette switch. Is it
possible that you are using that switch too? In that case, what is
probably happening is that the included image fills the color palette
before the green color is allocated, there are only 256 colors in a
palette PNG.

The "fixes" described on your web page resolve this because a) when not
setting the resolution, the default 100 DPI causes the image to be
scaled in such a way that it does not fill the color palette, probably
just by sheer luck. b) not including the image will of course not fill
the color palette.

I have tried setting the color before the page inclusion, but to
allocate the color in the PNG palette, there needs to be some output on
the page. Just selecting the color via


before the image inclusion is not enough. dvipng tries to be economical
with allocated colors and does not allocate it until it is used. One way
of resolving this would be to do (before the image inclusion)

      \textcolor{green}{Color allocation}

My recommended solution would be to allow truecolor output by removing
the --palette switch. It is the real cause for your trouble, after all.


SIGSIG -- signature too long (core dumped)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]