#ifndef __IMAGE_H__ #define __IMAGE_H__ #include typedef struct Image Image; enum { IMAGE_PIXEL_FORMAT_DEFAULT = 0, IMAGE_PIXEL_FORMAT_RGBA = 1, IMAGE_PIXEL_FORMAT_RGB = 2 }; struct Image { unsigned int width; unsigned int height; int pixelFormat; unsigned char * pixels; }; // TODO: Handle premultiplication Image * Image_loadFromPNG(const char * fileName, int pixelFormat, bool flipVertical); Image * Image_loadFromJPEG(const char * fileName, int pixelFormat, bool flipVertical); void Image_dispose(Image * image); #endif