crop

open override fun crop(left: Int, top: Int, width: Int, height: Int): LuminanceSource

Returns a new object with cropped image data. Implementations may keep a reference to the original data rather than a copy. Only callable if isCropSupported() is true.

Return

A cropped version of this object.

Parameters

left

The left coordinate, which must be in [0,getWidth())

top

The top coordinate, which must be in [0,getHeight())

width

The width of the rectangle to crop.

height

The height of the rectangle to crop.