Page 1 of 1

background not full white in image created by convert

Posted: 2008-07-03T02:38:41-07:00
by whennings
Hello all,
when CONVERTing an eps file (b&w) to png, the background is 245,254,254 which is not fully white.
Directly calling ghostscript creates a fully white backgroung (255,255,255)
I already tried specifying -background "#ffffff" but this doesn't help.
This occurs with ImageMagick-6.4.2-1-Q8-windows-dll.exe
Using ImageMagick-6.3.6-10-Q8-windows-dll.exe worked well.

Re: background not full white in image created by convert

Posted: 2008-07-03T06:09:40-07:00
by magick
Post a URL to a test image. We tried a couple of EPS to PNG conversions and got the expected 255 white value.

Re: background not full white in image created by convert

Posted: 2008-07-03T08:18:40-07:00
by whennings
magick wrote:Post a URL to a test image. We tried a couple of EPS to PNG conversions and got the expected 255 white value.
Here it is:
http://freenet-homepage.de/wh_ew/test/

Re: background not full white in image created by convert

Posted: 2008-07-03T11:59:44-07:00
by magick
The problem you posted is a bug in the pngalpha Ghostscript device. Try this command:

gs -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r300x300" -g79x42 -sOutputFile=test.png l2r_0001.eps

Test.png has a maximum value of 254. You can edit delegates.xml and change the pngalpha device to pnmraw to fix the problem but then you lose the ability to render transparent EPS images.

Re: background not full white in image created by convert

Posted: 2008-07-04T03:27:29-07:00
by whennings
magick wrote:The problem you posted is a bug in the pngalpha Ghostscript device.
Thank you very much!
I just posted a bug report on the Ghostscript bug tracker.