GdkPixbuf.Pixbuf.new_subpixbuf

### Method

# GdkPixbuf.Pixbuf.new_subpixbuf

#### Declaration [src]

    GdkPixbuf*
    gdk_pixbuf_new_subpixbuf (
      GdkPixbuf* src_pixbuf,
      int src_x,
      int src_y,
      int width,
      int height
    )

#### Description [src]

Creates a new pixbuf which represents a sub-region of `src_pixbuf`.

The new pixbuf shares its pixels with the original pixbuf, so writing to one affects both. The new pixbuf holds a reference to `src_pixbuf`, so `src_pixbuf` will not be finalized until the new pixbuf is finalized.

Note that if `src_pixbuf` is read-only, this function will force it to be mutable.

#### Parameters

`src_x` | `int`
| X coord in `src_pixbuf`
`src_y` | `int`
| Y coord in `src_pixbuf`
`width` | `int`
| width of region in `src_pixbuf`
`height` | `int`
| height of region in `src_pixbuf`

#### Return value

Returns: `GdkPixbuf`
a new pixbuf
Ownership of the data is transferred to the caller