| Cogl Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
CoglBitmap; CoglBitmap * cogl_bitmap_new_from_file (const,char *filename);CoglError **errorCoglBool cogl_bitmap_get_size_from_file (const,char *filename,int *width);int *heightCoglBool cogl_is_bitmap (); enum CoglBitmapError; #define COGL_BITMAP_ERRORvoid *object
Cogl allows loading image data into memory as CoglBitmaps without loading them immediately into GPU textures.
CoglBitmap is available since Cogl 1.0
CoglBitmap * cogl_bitmap_new_from_file (const,char *filename);CoglError **error
Loads an image file from disk. This function can be safely called from within a thread.
|
the file to load. |
|
a NULL |
Returns : |
a CoglBitmap to the new loaded image data, or
NULL |
Since 1.0
CoglBool cogl_bitmap_get_size_from_file (const,char *filename,int *width);int *height
Parses an image file enough to extract the width and height of the bitmap.
|
the file to check |
|
return location for the bitmap width, or NULL |
|
return location for the bitmap height, or NULL |
Returns : |
TRUE |
Since 1.0
CoglBool cogl_is_bitmap ();void *object
Checks whether object is a CoglBitmap
|
a CoglObject pointer |
Returns : |
TRUEobject represents a bitmap,
and FALSE |
Since 1.0
typedef enum {
COGL_BITMAP_ERROR_FAILED,
COGL_BITMAP_ERROR_UNKNOWN_TYPE,
COGL_BITMAP_ERROR_CORRUPT_IMAGE
} CoglBitmapError;
Error codes that can be thrown when performing bitmap
operations. Note that gdk_pixbuf_new_from_file()
| Generic failure code, something went wrong. | |
| Unknown image type. | |
| An image file was broken somehow. |
Since 1.4