A basic graphics package for the LPC4088 Display Module.
Dependents: lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI lpc4088_displaymodule_fs_aid ... more
Fork of DMBasicGUI by
Diff: Application/Image.h
- Revision:
- 17:6e2abf107800
- Parent:
- 5:f4de114c31c3
diff -r feb669462368 -r 6e2abf107800 Application/Image.h --- a/Application/Image.h Mon Mar 09 14:24:54 2015 +0000 +++ b/Application/Image.h Fri Mar 20 14:25:46 2015 +0100 @@ -20,6 +20,8 @@ #include "mbed.h" #include "rtos.h" +class Resource; + /** * Image example * @@ -107,7 +109,26 @@ * 1 on failure */ static int decode(const char* filename, Resolution res, ImageData_t* pDataOut, Mutex* pLock=NULL); - + + /** Decodes the specified image resource + * + * Note that if this function returns a zero, indicating success, + * the pixels member of the pDataOut structure must be + * deallocated using free() when no longer needed. + * + * The decoded image is cached in the Resource to prevent decoding + * the same resource over and over. + * + * @param res the resource to decode + * @param resolution the format of the display + * @param pDataOut the decoded image (only valid if 0 is returned) + * + * @returns + * 0 on success + * 1 on failure + */ + static int decode(Resource* res, Resolution resolution, ImageData_t* pDataOut, Mutex* pLock=NULL); + private: /** No instance needed