Jan-Åke Larsson
2008-01-10 09:20:37 UTC
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
http://mitcho.com/blog/2007/12/28/dvipng-color-trouble/
The DVI on your webpage works for me (dvipng >= v1.8), but I have beencontact 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
http://mitcho.com/blog/2007/12/28/dvipng-color-trouble/
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
\textcolor{green}{}
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}
\newpage
My recommended solution would be to allow truecolor output by removing
the --palette switch. It is the real cause for your trouble, after all.
/JÅ
--
SIGSIG -- signature too long (core dumped)
SIGSIG -- signature too long (core dumped)