GdkPixbuf.PixbufLoader.new_with_type
Description: Reference for GdkPixbuf.PixbufLoader.new_with_type

### Constructor

# GdkPixbuf PixbufLoadernew_with_type

#### Declaration [src]

    GdkPixbufLoader*
    gdk_pixbuf_loader_new_with_type (
      const char* image_type,
      GError** error
    )

#### Description [src]

Creates a new pixbuf loader object that always attempts to parse image data as if it were an image of type `image_type`, instead of identifying the type automatically.

This function is useful if you want an error if the image isn’t the expected type; for loading image formats that can’t be reliably identified by looking at the data; or if the user manually forces a specific type.

The list of supported image formats depends on what image loaders are installed, but typically “png”, “jpeg”, “gif”, “tiff” and “xpm” are among the supported formats. To obtain the full list of supported image formats, call gdk_pixbuf_format_get_name() on each of the `GdkPixbufFormat` structs returned by gdk_pixbuf_get_formats().

#### Parameters

`image_type` | `const char*`
| Name of the image format to be loaded with the image.
| The data is owned by the caller of the function.
| The string is a NUL terminated UTF-8 string.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `GdkPixbufLoader`
| A newly-created pixbuf loader.
| The caller of the function takes ownership of the data, and is responsible for freeing it.