Method

GimpImagecrop

Declaration [src]

gboolean
gimp_image_crop (
  GimpImage* image,
  gint new_width,
  gint new_height,
  gint offx,
  gint offy
)

Description [src]

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

new_width gint
 

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

new_height gint
 

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

offx gint
 

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

offy gint
 

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

Return value

Returns: gboolean
 

TRUE on success.