### Function

# Gimp Selection bounds

#### Declaration [src]

    gboolean
    gimp_selection_bounds (
      GimpImage* image,
      gboolean* non_empty,
      gint* x1,
      gint* y1,
      gint* x2,
      gint* y2
    )

#### Description [src]

Find the bounding box of the current selection.

This procedure returns whether there is a selection for the specified image. If there is one, the upper left and lower right corners of the bounding box are returned. These coordinates are relative to the image. Please note that the pixel specified by the lower right coordinate of the bounding box is not part of the selection. The selection ends at the upper left corner of this pixel. This means the width of the selection can be calculated as (x2 - x1), its height as (y2 - y1).

#### Parameters

`image` | `GimpImage`
| The image.
| The data is owned by the caller of the function.
`non_empty` | `gboolean*`
| TRUE if there is a selection.
| The argument will be set by the function.
`x1` | `gint*`
| X coordinate of upper left corner of selection bounds.
| The argument will be set by the function.
`y1` | `gint*`
| Y coordinate of upper left corner of selection bounds.
| The argument will be set by the function.
`x2` | `gint*`
| X coordinate of lower right corner of selection bounds.
| The argument will be set by the function.
`y2` | `gint*`
| Y coordinate of lower right corner of selection bounds.
| The argument will be set by the function.

#### Return value

Returns: | `gboolean`
| TRUE on success.