## GimpPixbuf GimpPixbuf — Definitions and Functions relating to GdkPixbuf. |

## Functions

const Babl * | gimp_pixbuf_get_format ()
GeglBuffer * | gimp_pixbuf_create_buffer ()
guint8 * | gimp_pixbuf_get_icc_profile ()

## Description

Definitions and Functions relating to GdkPixbuf.

## Functions

### gimp_pixbuf_get_format ()

    const Babl *
    gimp_pixbuf_get_format (GdkPixbuf *pixbuf);

Returns the Babl format that corresponds to the `pixbuf` 's pixel format.

#### Parameters

pixbuf | a GdkPixbuf |

#### Returns

the `pixbuf` 's pixel format

Since: 2.10

### gimp_pixbuf_create_buffer ()

    GeglBuffer *
    gimp_pixbuf_create_buffer (GdkPixbuf *pixbuf);

Returns a GeglBuffer that's either backed by the `pixbuf` 's pixels, or a copy of them. This function tries to not copy the `pixbuf` 's pixels. If the pixbuf's rowstride is a multiple of its bpp, a simple reference to the `pixbuf` 's pixels is made and `pixbuf` will be kept around for as long as the buffer exists; otherwise the pixels are copied.

#### Parameters

pixbuf | a GdkPixbuf |

#### Returns

a new GeglBuffer.

Since: 2.10

### gimp_pixbuf_get_icc_profile ()

    guint8 *
    gimp_pixbuf_get_icc_profile (GdkPixbuf *pixbuf,
                                 gsize *length);

Returns the ICC profile attached to the `pixbuf` , or `NULL` if there is none.

#### Parameters

pixbuf | a GdkPixbuf |
length | return location for the ICC profile's length |

#### Returns

The ICC profile data, or `NULL`. The value should be freed with `g_free()`.

Since: 2.10