Graphical demo for the LPC4088 Experiment Base Board with one of the Display Expansion Kits. This demo shows a rotating 3D cube with and without textures.
Diff: Image.h
- Revision:
- 0:c828045bbe69
diff -r 000000000000 -r c828045bbe69 Image.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Image.h Fri Oct 03 12:48:37 2014 +0000 @@ -0,0 +1,47 @@ + +#ifndef IMAGE_H +#define IMAGE_H + +class Image { +public: + + enum Type { + BMP = 0, + PNG, + UNKNOWN + }; + + typedef struct { + uint16_t* pixels; + uint32_t width; + uint32_t height; + } ImageData_t; + + /** Decodes the specified image data + * + * Note that if this function returns a zero, indicating success, + * the pixels member of the pDataOut structure must be + * deallocated using lpc_free() when no longer needed. + * + * @param pDataIn the image data + * @param sizeIn the number of bytes in the pDataIn array + * @param pDataOut the decoded image (only valid if 0 is returned) + * + * @returns + * 0 on success + * 1 on failure + */ + static int decode(const unsigned char* pDataIn, unsigned int sizeIn, ImageData_t* pDataOut); + +private: + + /** No instance needed + * + */ + Image(); + + static Type imageType(const unsigned char* pDataIn, unsigned int sizeIn); +}; + +#endif +