Take
Returns a new Image which is the source image, but only keeping a specified number of pixels from the top, bottom, left or right.
For example, takeLeft(k)
will return a subimage with bounds [0, 0, k, height]
.
Examples
Using this image scaled to 640 x 360 as our input:
Code | Output |
---|---|
image.takeLeft(300) |
|
image.takeLeft(300).takeTop(200) |
|
image.takeRight(400).takeBottom(200) |