# Gimp.Image.crop

    @accepts(Gimp.Image, int, int, int, int)
    @returns(bool)
    def crop(self, new_width, new_height, offx, offy):
        # Python 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.

self

  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