Constructor
GdkPixbufPixbufLoadernew_with_mime_type
since: 2.4
Declaration [src]
GdkPixbufLoader*
gdk_pixbuf_loader_new_with_mime_type (
const char* mime_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 MIME type mime_type
, instead of
identifying the type automatically.
This function is useful if you want an error if the image isn’t the expected MIME type; for loading image formats that can’t be reliably identified by looking at the data; or if the user manually forces a specific MIME type.
The list of supported mime types depends on what image loaders
are installed, but typically “image/png”, “image/jpeg”, “image/gif”,
“image/tiff” and “image/x-xpixmap” are among the supported mime types.
To obtain the full list of supported mime types, call
gdk_pixbuf_format_get_mime_types()
on each of the GdkPixbufFormat
structs returned by gdk_pixbuf_get_formats().
Available since: 2.4
Parameters
mime_type
-
Type:
const char*
The mime type to be loaded.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. error
-
Type:
GError **
The return location for a recoverable error.
The argument can be NULL
.If the return location is not NULL
, then you must initialize it to aNULL
GError*
.The argument will be left initialized to NULL
by the constructor if there are no errors.In case of error, the argument will be set to a newly allocated GError
; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: GdkPixbufLoader
A newly-created pixbuf loader.
The caller of the function takes ownership of the data, and is responsible for freeing it. |