17unsigned char *
glCompLoadPng(cairo_surface_t **surface,
const char *filename,
18 int *imageWidth,
int *imageHeight) {
19 *surface = cairo_image_surface_create_from_png(filename);
20 if (*surface ==
NULL ||
21 cairo_surface_status(*surface) != CAIRO_STATUS_SUCCESS) {
24 *imageWidth = cairo_image_surface_get_width(*surface);
25 *imageHeight = cairo_image_surface_get_height(*surface);
26 return cairo_image_surface_get_data(*surface);
unsigned char * glCompLoadPng(cairo_surface_t **surface, const char *filename, int *imageWidth, int *imageHeight)