Page 1 of 1

convert fails on an black PNG / JPG

Posted: 2008-07-18T07:40:36-07:00
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

Re: convert fails on an black PNG / JPG

Posted: 2008-07-18T08:45:12-07:00
by magick
> convert test.eps -colorspace RGB test.jpg

Try this command:

convert -colorspace RGB test.eps test.jpg

Re: convert fails on an black PNG / JPG

Posted: 2008-07-18T11:07:16-07:00
by agiardina
doesn't work :(

Re: convert fails on an black PNG / JPG

Posted: 2008-07-18T11:21:38-07:00
by magick
Post a URL to your image so we can download it and reproduce the problem.

Re: convert fails on an black PNG / JPG

Posted: 2008-07-18T11:41:16-07:00
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

Re: convert fails on an black PNG / JPG

Posted: 2008-07-18T12:15:32-07:00
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

Re: convert fails on an black PNG / JPG

Posted: 2008-07-19T04:10:18-07:00
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 :(