background not full white in image created by convert

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
whennings

background not full white in image created by convert

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: background not full white in image created by convert

Post 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.
whennings

Re: background not full white in image created by convert

Post 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/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: background not full white in image created by convert

Post 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.
whennings

Re: background not full white in image created by convert

Post 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.
Post Reply