# RMagick \> image crop or clipp with 4 cornres coordinates

**URL:** <https://www.ruby-forum.com/t/rmagick-image-crop-or-clipp-with-4-cornres-coordinates/148860>\
**Category:** Ruby\
**Created:** [September 17, 2008, 8:42pm UTC](https://www.ruby-forum.com/t/rmagick-image-crop-or-clipp-with-4-cornres-coordinates/148860 "2008-09-17T20:42:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [September 17, 2008, 8:42pm UTC](https://www.ruby-forum.com/t/rmagick-image-crop-or-clipp-with-4-cornres-coordinates/148860/1 "2008-09-17T20:42:13Z")

</div>

hi,

newbie for Rmagick…

is there any methods to crop or clipp original image with 4 corners  
coordinates (xi, yi) i=1…4. Have seen it is possible to use  
ImageList::crop(x,y,heigth, wigth) to get a rectangle sub-image.

thanks in advances!  
vinc.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [September 17, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/rmagick-image-crop-or-clipp-with-4-cornres-coordinates/148860/2 "2008-09-17T21:14:09Z")

</div>

2008/9/17 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> hi,

Hi,

> newbie for Rmagick…
> 
> is there any methods to crop or clipp original image with 4 corners  
> coordinates (xi, yi) i=1…4. Have seen it is possible to use  
> ImageList::crop(x,y,heigth, wigth) to get a rectangle sub-image.

If you want something general, look at the methods define\_clip\_path  
and clip\_path of the class Draw. Take a special look to the example of  
the clip\_path method (just click on the image to see the code) in the  
RMagick doc.

> thanks in advances!

I hope it to help you.

Serabe
