crop EPS

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
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

crop EPS

Post by kriks »

Hello,

I need to be able to crop some EPS files

so I make (via phpMagickwand) :

Code: Select all

# convert -verbose -crop 50x50+10+10 11111.eps 11111.crop.eps
"gs" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pam" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g310x425  "-sOutputFile=/tmp/magick-XXg0D1u0" "-f/tmp/magick-XXiBVAHj" "-f/tmp/magick-XXn3qiUC"
/tmp/magick-XXg0D1u0 PNM 310x425 310x425+0+0 DirectClass 8-bit 514.76kb
/tmp/magick-XX1y5WeW PS 1290x1772=>310x425 310x425+0+0 DirectClass 16-bit 514.76kb
11111.eps EPT 1290x1772=>310x425 310x425+0+0 DirectClass 16-bit 514.76kb
11111.eps=>11111.crop.eps EPT 1290x1772=>50x50 310x425+10+10 DirectClass 16-bit 29.5312kb
but the resulting EPS is not useable, see :

http://www.pingroom.net/11111.eps
http://www.pingroom.net/11111..crop.eps

I use imagemagick 6.3.8.3 and GPL Ghostscript 8.61

(maybe a link with : viewtopic.php?f=3&t=10466&start=0&st=0&sk=t&sd=a )

can you help me?

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

Re: crop EPS

Post by magick »

Until we have a fix, try this command:
  • convert 11111.eps -crop 50x50+10+10 +profile xml 11111.crop.eps
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: crop EPS

Post by kriks »

thanks, this seems to work, how can I use this with magickwand for php?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: crop EPS

Post by magick »

Use MagickProfileImage() with a NULL profile to remove a profile from an image with MagickWand for PHP.
Post Reply