Add API for extracting image size from a file

For the asynchronous loading we need a function call that parses
a file, given its path, and retrieves the image width and height.

This commit adds cogl_bitmap_get_size_from_file() to the CoglBitmap
API.
This commit is contained in:
Emmanuele Bassi
2009-01-12 16:52:20 +00:00
parent 743b5c03dc
commit c78d963e90
4 changed files with 86 additions and 9 deletions

View File

@ -149,6 +149,14 @@ _cogl_bitmap_copy_subregion (CoglBitmap *src,
}
}
gboolean
cogl_bitmap_get_size_from_file (const gchar *filename,
gint *width,
gint *height)
{
return _cogl_bitmap_get_size_from_file (filename, width, height);
}
CoglBitmap *
cogl_bitmap_new_from_file (const gchar *filename,
GError **error)