module

CrImage::Operation::Crop

Crops an image

Taking sample image:

Woman with black turtleneck and white background
# These calls are equivalent
image.crop(40, 30, 80, 80)
image[40...120, 30...110]
Cropped image of woman's face

Instance methods

[](xrange : Range, yrange : Range) : self
Source
crop(x : Int32, y : Int32, new_width : Int32, new_height : Int32) : self
Source
crop(region : Region) : self
Source
crop!(x : Int32, y : Int32, new_width : Int32, new_height : Int32) : self
Source
crop!(region : Region) : self
Source