The
gdk-pixbuf
Library
gdk-pixbuf-refcounting.html
<<< Previous Page
index.html
Home
r27.html
Up
gdk-pixbuf-creating.html
Next Page >>>
File Loading
Name
File Loading -- Loading a pixbuf from a file.
Synopsis
#include <gdk-pixbuf/gdk-pixbuf.h>
GdkPixbuf*
gdk-pixbuf-file-loading.html#GDK-PIXBUF-NEW-FROM-FILE
gdk_pixbuf_new_from_file
(const char *filename);
Description
The
gdk-pixbuf
library provides a simple mechanism for loading
an image from a file in synchronous fashion.  This means that the
library takes control of the application while the file is being
loaded; from the user's point of view, the application will block
until the image is done loading.
This interface can be used by applications in which blocking is
acceptable while an image is being loaded.  It can also be used to
load small images in general.  Applications that need progressive
loading can use the
gdkpixbufloader.html
GdkPixbufLoader
functionality instead.
Details
gdk_pixbuf_new_from_file ()
GdkPixbuf*  gdk_pixbuf_new_from_file        (const char *filename);
Creates a new pixbuf by loading an image from a file.  The file format is
detected automatically.
filename
:
Name of file to load.
Returns
:
A newly-created pixbuf with a reference count of 1, or
NULL
if
any of several error conditions occurred:  the file could not be opened,
there was no loader for the file's format, there was not enough memory to
allocate the image buffer, or the image file contained invalid data.
See Also
gdkpixbufloader.html
GdkPixbufLoader
.
gdk-pixbuf-refcounting.html
<<< Previous Page
index.html
Home
r27.html
Up
gdk-pixbuf-creating.html
Next Page >>>
Reference Counting and Memory Mangement
Image Data in Memory
