Gimp.Image.prototype.crop

function crop(new_width: Number(gint), new_height: Number(gint), offx: Number(gint), offy: Number(gint)): Boolean {
    // Gjs wrapper for gimp_image_crop()
}
  

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.

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.