### Method

# GdkPixbuf Pixbuf read_pixel_bytes

since: 2.32

#### Declaration [src]

    GBytes*
    gdk_pixbuf_read_pixel_bytes (
      const GdkPixbuf* pixbuf
    )

#### Description [src]

Provides a `GBytes` buffer containing the raw pixel data; the data must not be modified.

This function allows skipping the implicit copy that must be made if `gdk_pixbuf_get_pixels()` is called on a read-only pixbuf.

Available since: 2.32

#### Return value

Type: `GBytes`

A new reference to a read-only copy of the pixel data. Note that for mutable pixbufs, this function will incur a one-time copy of the pixel data for conversion into the returned `GBytes`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.