Page 1 of 1

How do you do "-region"?

Posted: 2008-02-27T12:08:09-07:00
by kkjj
I am creating a php script to automate stuff and I need to do the command below in magickwand.

Code: Select all

convert smile.jpg -region 150x150+130+220 -implode -0.4 output.jpg
I've read the documentation but I can't figure out how to do the "-region 150x150+130+220" part. Plz help me :)

Re: How do you do "-region"?

Posted: 2008-02-27T13:05:54-07:00
by magick
-region is a convenience option that extracts the defined region from the image, operates on it, and then composites the result over the original image. For MagickWand for PHP you need to perform these steps yourself. Use MagickCropImage() to extract the region, operate on the cropped image and then use MagickCompositeImage() to overlay the cropped image onto your original image.

Re: How do you do "-region"?

Posted: 2008-03-05T08:58:12-07:00
by kkjj
Got it. Thanks :D