GfImage

GfImage — GfImage Object API

Synopsis




            GfImage;
GfImage*    gf_image_new_from_file          (const gchar *filename);
GfImage*    gf_image_new_from_data          (const guchar *data,
                                             gsize data_sz);
void        gf_image_set_data               (GfImage *image,
                                             const guchar *data,
                                             gsize data_sz);
const guchar* gf_image_get_data             (const GfImage *image,
                                             gsize *data_sz);

Object Hierarchy


  GObject
   +----GfObject
         +----GfImage

Description

A GfImage is a abstract representation of static images. Since nothing is known about the image, like it's format, we can not preform any sort of modifications to it.

Details

GfImage

typedef struct _GfImage GfImage;

GfImage is an opaque structure that should not be used directly.


gf_image_new_from_file ()

GfImage*    gf_image_new_from_file          (const gchar *filename);

Creates a new GfImage from a file.

filename : The name of the file to create the image from.
Returns : The new GfImage or NULL.

gf_image_new_from_data ()

GfImage*    gf_image_new_from_data          (const guchar *data,
                                             gsize data_sz);

Creates a new GfImage from data.

data : The image data.
data_sz : The size of the image data.
Returns : The new GfImage or NULL.

gf_image_set_data ()

void        gf_image_set_data               (GfImage *image,
                                             const guchar *data,
                                             gsize data_sz);

Sets the data for a GfImage.

image : The GfImage instance.
data : The data.
data_sz : The size of data.

gf_image_get_data ()

const guchar* gf_image_get_data             (const GfImage *image,
                                             gsize *data_sz);

Gets the data from a GfImage.

image : The GfImage instance.
data_sz : Return address for the size of the data or NULL.
Returns : The image data.