incorrect transparency handling when converting to EPS

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
donovaly
Posts: 43
Joined: 2004-10-04T16:24:55-07:00

incorrect transparency handling when converting to EPS

Post by donovaly »

- convert this XPM-image:
http://fkurth.de/uwest/usti/tabular-insert.xpm
to EPS. The result is this:
http://fkurth.de/uwest/usti/tabular-insert.eps

The XPM-image uses transparent pixels that are incorrectly painted black in the EPS. When converting the XPM-image to any other format, the result is correct so I don't know if this is a bug in Ghostscript or in the way ImageMagick addresses Ghostscript.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: incorrect transparency handling when converting to EPS

Post by anthony »

IM does not use ghostscript to write EPS, its needed for reading EPS, not write.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
donovaly
Posts: 43
Joined: 2004-10-04T16:24:55-07:00

Re: incorrect transparency handling when converting to EPS

Post by donovaly »

So then it's a bug in ImageMagick that the transparent pixels are painted black. If EPS doesn't support transparencies, the transparent pixels should be painted white as this is the case for any other conversions made by IM and also other graphic programs.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: incorrect transparency handling when converting to EPS

Post by anthony »

You can paint transparency white using
-background white -flatten
before the final save.
As for transparency in EPS output. I don't know. Sorry.
You are the first to have a problem with EPS output, rather than EPS input.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply