EPS to PNG conversion makes background transparent in hardy

Bug #262183 reported by Hein Zelle
10
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

Revision history for this message
Hein Zelle (zelle) wrote :

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.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Thank you for your bug report and a proposed fix.
Can you check if this is still an issue with the latest upstream version of imagemagick (by looking at the source) and if so, forward the bug upstream?
If you do so, please link the report from here, so it can get automatically get tracked.
Thanks again.

Changed in imagemagick:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Victor Vargas (kamus) wrote :

Since this report have a long time without activity, could you check (if is possible) in latest Ubuntu Karmic version if this issue is still happening? Thanks in advance.

Revision history for this message
Daniel Hahler (blueyed) wrote :

A test case would be appreciated, then I could have checked this myself (before and now).

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Is this actually a bug? I mean it's a change in behaviour, but is it right to say that it should have a white background?
Transparent seems perfectly reasonable to me for a postscript rendering of an eps image - especially since there is an option to turn alpha off if you don't want it.

Postscript on a real printer wouldn't put a big block of white unless it was explicitly there, and if you print on a blue piece of paper you'll get blue not white!

Dave

Revision history for this message
Tobias Wolf (towolf) wrote :

It’s only white in PostScript viewers because they use white as the default background.

Not a bug.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

Based on comments from Tobis and Dave, I'm closing this bug as invalid. If you feel that this is done wrongly, feel free to reopen the bug or open a new bug.

Changed in imagemagick (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.