module ChunkyPNG::Canvas::Operations
def crop(x, y, crop_width, crop_height)
-
(ChunkyPNG::OutOfBounds)
- when the crop dimensions plus the given
Returns:
-
(ChunkyPNG::Canvas)
- Returns the newly created cropped image.
Parameters:
-
crop_height
(Integer
) -- The height of the image to be cropped. -
crop_width
(Integer
) -- The width of the image to be cropped. -
y
(Integer
) -- The y-coordinate of the top left corner of the image -
x
(Integer
) -- The x-coordinate of the top left corner of the image
def crop(x, y, crop_width, crop_height) dup.crop!(x, y, crop_width, crop_height) end