module CrImage::Operation::Crop

Overview

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

Direct including types

Defined in:

cr-image/operation/crop.cr

Instance Method Summary

Instance Method Detail

def [](xrange : Range, yrange : Range) : self #

[View source]
def crop(x : Int32, y : Int32, new_width : Int32, new_height : Int32) : self #

[View source]
def crop(region : Region) : self #

[View source]
def crop!(x : Int32, y : Int32, new_width : Int32, new_height : Int32) : self #

[View source]
def crop!(region : Region) : self #

[View source]