convert fails on an black PNG / JPG

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
agiardina

convert fails on an black PNG / JPG

Post by agiardina »

Hello,
I'm trying to convert an eps to jpg (or png) with this command:

convert test.eps -colorspace RGB test.jpg

but the result is a fully black image (without option RGB the result is a fully white or transparent image).

I'm using ImageMagick 6.4.1 on Debian (I used official debian package and I also compiled im from source to testing but the result is the same)

Any idea? Can i run any debug command?

Thanks a lot.
Andrea
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert fails on an black PNG / JPG

Post by magick »

> convert test.eps -colorspace RGB test.jpg

Try this command:

convert -colorspace RGB test.eps test.jpg
agiardina

Re: convert fails on an black PNG / JPG

Post by agiardina »

doesn't work :(
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert fails on an black PNG / JPG

Post by magick »

Post a URL to your image so we can download it and reproduce the problem.
agiardina

Re: convert fails on an black PNG / JPG

Post by agiardina »

Maybe convert dosn't read %%BoundingBox tag?
My file has %%BoundingBox: 0 676 104 842

If I run convert with the -verbose option I have this output:
/usr/bin/convert: "gs" -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pnmraw -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -g82x99 -r72x72 "-sOutputFile=/tmp/gm1fOIq1" -- "/tmp/gmY2E8Jt" -c quit.

If I run instead gs interactly with -0 -676 translate command it works.

You can find my image here:
http://www.crealabsfoundation.org/test.eps

Thanks
ag
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert fails on an black PNG / JPG

Post by magick »

It appears the bounding box is wrong. We tried displaying your image with a number of utilities and they all produced a pure white image just as ImageMagick does. This command works for us:
  • convert -page letter -colorspace rgb test.eps -trim test.png
agiardina

Re: convert fails on an black PNG / JPG

Post by agiardina »

Yes you are right, a lot of tools fails to display it but gimp import it without problems. I tried your command but doesn't work fine. The png is without upper side :(
Post Reply