4
* An object oriented GL/GLES Abstraction/Utility Layer
6
* Copyright (C) 2007,2008,2009 Intel Corporation.
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
24
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
25
#error "Only <cogl/cogl.h> can be included directly."
28
#ifndef __COGL_BITMAP_H__
29
#define __COGL_BITMAP_H__
31
#include <cogl/cogl-types.h>
37
* @short_description: Fuctions for loading images
39
* Cogl allows loading image data into memory as CoglBitmaps without
40
* loading them immediately into GPU textures.
42
* #CoglBitmap is available since Cogl 1.0
47
* cogl_bitmap_new_from_file:
48
* @filename: the file to load.
49
* @error: a #GError or %NULL.
51
* Loads an image file from disk. This function can be safely called from
54
* Return value: a #CoglHandle to the new loaded image data, or
55
* %COGL_INVALID_HANDLE if loading the image failed.
60
cogl_bitmap_new_from_file (const char *filename,
64
* cogl_bitmap_get_size_from_file:
65
* @filename: the file to check
66
* @width: (out): return location for the bitmap width, or %NULL
67
* @height: (out): return location for the bitmap height, or %NULL
69
* Parses an image file enough to extract the width and height
72
* Return value: %TRUE if the image was successfully parsed
77
cogl_bitmap_get_size_from_file (const char *filename,
83
* @handle: a #CoglHandle for a bitmap
85
* Checks whether @handle is a #CoglHandle for a bitmap
87
* Return value: %TRUE if the passed handle represents a bitmap,
88
* and %FALSE otherwise
93
cogl_is_bitmap (CoglHandle handle);
97
#endif /* __COGL_BITMAP_H__ */