php - ImageMagick and mogrify crop -
i have having problems getting crop work on image (i have got resize working fine)
the orginal image x
, after resize:
mogrify -resize x75 /my/path/image.jpg
i can see resize has worked after performing getimagesize():
array ( [0] => 148 [1] => 75 [2] => 2 [3] => width="148" height="75" [bits] => 8 [channels] => 3 [mime] => image/jpeg )
the crop command is:
mogrify -crop 100x75! +0+0 /my/path/image.jpg
once complete try , confirm image correct size using getimagesize()
following error , can't access image.
warning (2): getimagesize(/my/path/image.jpg) [function.getimagesize]: failed open stream: no such file or directory
any ideas? using wrong syntax crop?
thanks in advance!
looks error in syntax there no space between image size , crop position. it should this:
mogrify -crop 100x75!+0+0 /my/path/image.jpg
the below incorrect:
mogrify -crop 100x75! +0+0 /my/path/image.jpg
Comments
Post a Comment