blob: 1291e1b7600744c2c4fd758202386f150db08a4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/**
* @file image.h
* @author Joe Wingbermuehle
* @date 2005-2006
*
* @brief Functions to load images.
*
*/
#ifndef IMAGE_H
#define IMAGE_H
/** Structure to represent an image. */
typedef struct ImageNode {
#ifdef USE_PNG
png_uint_32 width; /**< Width of the image. */
png_uint_32 height; /**< Height of the image. */
#else
int width; /**< Width of the image. */
int height; /**< Height of the image. */
#endif
unsigned long *data; /**< Image data. */
} ImageNode;
/** Load an image from a file.
* @param fileName The file containing the image.
* @return A new image node (NULL if the image could not be loaded).
*/
ImageNode *LoadImage(const char *fileName);
/** Load an image from data.
* The data must be in the format from the EWMH spec.
* @param data The image data.
* @return A new image node (NULL if there were errors.
*/
ImageNode *LoadImageFromData(char **data);
/** Destroy an image node.
* @param image The image to destroy.
*/
void DestroyImage(ImageNode *image);
#endif
|