EPS to PNG conversion makes background transparent in hardy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
imagemagick (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
Binary package hint: imagemagick
I have found a problem with the imagemagick version used in the
latest 8.04 ubuntu distribution (Version: ImageMagick 6.3.7 02/19/08
Q16). When trying the following:
convert file1.eps file1.png
the background of the eps file (white) is now automatically converted
to transparent. This used to stay white, as it is rendered by gv and
other postscript viewers. Both "convert" and "display" make the
background transparent. I am not certain if the problem is in
imagemagick, the ghostscript interpreter or with the ubuntu 8.04
distribution: my ubuntu 7.10 install (Version: ImageMagick 6.2.4
10/02/07 Q16) does not suffer from it. When looking at the
commandline options passed to gs, I see that the old version uses
"-sDEVICE=pnmraw"
while the new version uses
"-sDEVICE=pngalpha"
which suggests the problem may be there. Is there a way to circumvent
this problem with an extra option?
zelle@vega:~$ lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04
ii imagemagick 7:6.3.7.9.dfsg1-2 image manipulation programs
ii ghostscript 8.61.dfsg.1-1ubun The GPL Ghostscript PostScript/PDF interpreter
ii ghostscript-x 8.61.dfsg.1-1ubun The GPL Ghostscript PostScript/PDF interpreter - X
I've found a workaround and a "fix" for this problem, but the ImageMagick developers would have to judge if it is a real fix.
The workaround is to specify explicitly the option
-alpha off
on the commandline for convert. For example
convert -alpha off +antialias -density 120 -rotate 270 test.eps test.png
The "fix" is to modify the file delegates.xml and to change the DEVICE option for the ps:alpha type from pngalpha to pnmraw. The behaviour then seems to be "as it used to" again. It is unclear if this has further side effects.