Page 1 of 1
EPS conversion issue if geometry is larger than bounding box
Posted: 2012-02-29T02:08:24-07:00
by eero
Source image (EPS, CMYK):
http://office.crasman.fi/~eero/imagick/sample.eps
Target image (JPG, CMYK):
http://office.crasman.fi/~eero/imagick/sample.jpg
Software versions are ImageMagick 6.7.5-6 2012-02-21 Q16 and GPL Ghostscript 9.04 (2011-08-05)
I'm trying to convert EPS image to JPEG.
convert sample.eps sample.jpg
This is what happens: target image size becomes 612 x 729 (this is what identify reports as "Geometry" for sample.eps), but actual image (207 x 204, this is what "ps:HiResBoundingBox" is) is located on bottom left corner of resulting image, and all other parts of image is white. See for sample target image (sample.jpg, CMYK format).
Imagemagick identifies this source image like this:
Geometry: 612x792+0+0
(Why isn't this 207 x 204 ?)
HiResBoundingBox-information shows real image size:
ps:HiResBoundingBox: 207x204+0+0
I think that the problem is that imagemagick should make conversion using bounding box size, not geometry. Or then there's probably something wrong with reading geometry from EPS image.
With older imagemagick everything works fine (version 6.7.2-6 2011-09-15 Q16), I think that recent EPS bounding box fixes caused this.
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2012-02-29T04:57:33-07:00
by magick
There was a transient bug in ImageMagick which we fixed a few days ago. Look for ImageMagick-6.7.5-8 within a few days that includes the patch.
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2012-04-09T14:27:28-07:00
by Flauschi
Hey Team!
Is the bug still present in 6.7.6.1.Q16?
Same issue.
have large set of eps contain pictures in hiresbox.
convert from eps to jpg
imagemagick uses geometry instead of hiresbox.
Any Suggestions?
Could upload samples if needed.
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2012-04-09T16:41:58-07:00
by magick
We'll need the samples. Once we can reproduce the problem, we'll come up with a fix.
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2012-04-10T09:51:09-07:00
by Flauschi
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2012-04-10T10:28:26-07:00
by magick
Ok, got them. What is the exact conversion command you are using? We convert with 'convert test.eps test.jpg' and get the expected results. We're using ImageMagick 6.7.6-5.
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2012-04-10T12:28:10-07:00
by Flauschi
i simply used
convert test.eps test.jpg
im on win7ultimate imagemagick 6.7.6-5 2012-04-04 -q8
convert -verbose test.eps test.jpg
"C:/Program Files/gs/gs9.05/bin/gswin64c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAU
SE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=2 "-
sDEVICE=pamcmyk32" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r300x300" -g2525x25
12 "-sOutputFile=AppData/Local/Temp/magick-KaWjw1fz-%08d" "-fC:
/Users/Flo530/AppData/Local/Temp/magick-63oWuWDS" "-fC:/Users/Flo530/AppData/Loc
al/Temp/magick-PveJWCqo"
/AppData/Local/Temp/magick-KaWjw1fz-00000001 PAM 2525x2512 2525x2
512+0+0 8-bit ColorSeparation DirectClass 25.37MB 0.078u 0:00.076
test.eps PS 2524x2512=>2525x2512 2525x2512+0+0 8-bit ColorSeparation DirectClass
25.37MB 0.016u 0:00.014
test.eps=>test.jpg PS 2524x2512=>2525x2512 2525x2512+0+0 8-bit ColorSeparation D
irectClass 2.933MB 1.014u 0:01.167
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2012-04-10T16:59:05-07:00
by magick
Interesting. Your image has an embedded Photoshop profile that declares the resolution to be 300 x 300. We use that to render the image. Should we instead render at the default resolution of 72 x 72 and then set the resolution to 300x300 per the Photoshop profile?
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2012-04-10T20:28:32-07:00
by Flauschi
im a bit confused
isnt it the same problem?
identify with verbose show´s me
the real image size in
ps:hiresboundingbox 606x603+0+0
but image magick use base geometry 2525x2512
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2012-04-11T03:54:42-07:00
by magick
Look for a patch for this problem in ImageMagick 6.7.6-6 when its released later this week. Thanks.
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2012-04-11T22:06:37-07:00
by Flauschi
thanks alot
Re: EPS conversion issue if geometry is larger than bounding
Posted: 2013-05-31T08:12:51-07:00
by christian.lanconelli
On Fedora 17 IM 6.7.5-6, still with a problem that look like that posted here.
The correct size of the image is not identified when convertign a postscript to jpg (for example).
Get here the files
http://www.isac.cnr.it/~radiclim/pagela ... d_bbox.tar (tmp.jpg is converted with a previous version of IM e.g 6.6, tmp-err.jpg with IM 6.7).
Running identify -verbose on tmp.ps appears to recognize bbox correctly but image size "incorrectly". Any idea?