GdkPixbuf.Pixbuf.new
Description: Reference for GdkPixbuf.Pixbuf.new

### Constructor

# GdkPixbuf.Pixbuf.new

#### Declaration [src]

    GdkPixbuf*
    gdk_pixbuf_new (
      GdkColorspace colorspace,
      gboolean has_alpha,
      int bits_per_sample,
      int width,
      int height
    )

#### Description [src]

Creates a new `GdkPixbuf` structure and allocates a buffer for it.

If the allocation of the buffer failed, this function will return `NULL`.

The buffer has an optimal rowstride. Note that the buffer is not cleared; you will have to fill it completely yourself.

#### Parameters

`colorspace` | `GdkColorspace`
| Color space for image
`has_alpha` | `gboolean`
| Whether the image should have transparency information
`bits_per_sample` | `int`
| Number of bits per color sample
`width` | `int`
| Width of image in pixels, must be > 0
`height` | `int`
| Height of image in pixels, must be > 0

#### Return value

Returns: `GdkPixbuf`
A newly-created pixel buffer
Ownership of the data is transferred to the caller
Can be `NULL`