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 » 2008-02-27T12:08:09-07:00

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: 10934
Joined: 2003-05-31T11:32:55-07:00

Re: How do you do "-region"?

Post by magick » 2008-02-27T13:05:54-07:00

-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 » 2008-03-05T08:58:12-07:00

Got it. Thanks :D

Post Reply