How do you do "-region"?

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
kkjj

How do you do "-region"?

Post 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 :)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How do you do "-region"?

Post 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.
kkjj

Re: How do you do "-region"?

Post by kkjj »

Got it. Thanks :D
Post Reply