crop


Description:

public bool crop (int new_width, int new_height, int offx, int offy)

Crop the image to the specified extents.

This procedure crops the image so that it's new width and height are equal to the supplied parameters. Offsets are also provided which describe the position of the previous image's content. All channels and layers within the image are cropped to the new image extents; this includes the image selection mask. If any parameters are out of range, an error is returned.

Parameters:

this

The image.

new_width

New image width: (0 < new_width <= width).

new_height

New image height: (0 < new_height <= height).

offx

X offset: (0 <= offx <= (width - new_width)).

offy

Y offset: (0 <= offy <= (height - new_height)).

Returns:

TRUE on success.