Page 1 of 1

crop EPS

Posted: 2008-03-05T09:35:14-07:00
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

Re: crop EPS

Posted: 2008-03-05T11:56:02-07:00
by magick
Until we have a fix, try this command:
  • convert 11111.eps -crop 50x50+10+10 +profile xml 11111.crop.eps

Re: crop EPS

Posted: 2008-03-06T01:36:56-07:00
by kriks
thanks, this seems to work, how can I use this with magickwand for php?

Re: crop EPS

Posted: 2008-03-06T08:22:44-07:00
by magick
Use MagickProfileImage() with a NULL profile to remove a profile from an image with MagickWand for PHP.