Bitmaps
3
COGL Library

# Bitmaps

Fuctions for loading images but not directly into textures

## Synopsis

    CoglHandle          cogl_bitmap_new_from_file           (const gchar *filename,
                                                             GError **error);
    gboolean            cogl_bitmap_get_size_from_file      (const gchar *filename,
                                                             gint *width,
                                                             gint *height);

## Description

Cogl allows loading image data into memory as CoglBitmaps without loading them immediately into GPU textures.

## Details

### cogl_bitmap_new_from_file ()

    CoglHandle          cogl_bitmap_new_from_file           (const gchar *filename,
                                                             GError **error);

Loads an image file from disk. This function can be safely called from within a thread.

`filename` :

  the file to load.

`error` :

  a GError or `NULL`.

Returns :

  a CoglHandle to the new loaded image data, or `COGL_INVALID_HANDLE` if loading the image failed.

Since 1.0

### cogl_bitmap_get_size_from_file ()

    gboolean            cogl_bitmap_get_size_from_file      (const gchar *filename,
                                                             gint *width,
                                                             gint *height);

Parses an image file enough to extract the width and height of the bitmap.

`filename` :

  the file to check

`width` :

  return location for the bitmap width

`height` :

  return location for the bitmap height

Returns :

  `TRUE` if the image was successfully parsed

Since 1.0