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:
- 1:46c8df4608c8
- Parent:
- 0:4977187e90c7
- Child:
- 3:3fabfe3339b8
--- a/Application/Image.h Thu Dec 11 11:03:57 2014 +0000 +++ b/Application/Image.h Thu Dec 11 18:15:52 2014 +0000 @@ -1,9 +1,24 @@ +/* + * Copyright 2014 Embedded Artists AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #ifndef IMAGE_H #define IMAGE_H /** - * LcdController example + * Image example * * @code * #include "mbed.h" @@ -58,11 +73,11 @@ * * 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. + * deallocated using free() when no longer needed. * * @param pDataIn the image data * @param sizeIn the number of bytes in the pDataIn array - * @param Resolution the format of the display + * @param res the format of the display * @param pDataOut the decoded image (only valid if 0 is returned) * * @returns @@ -71,6 +86,20 @@ */ static int decode(const unsigned char* pDataIn, unsigned int sizeIn, Resolution res, ImageData_t* pDataOut); + /** Reads the specified file and decodes the image data + * + * 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. + * + * @param filename the file name and path + * @param res 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(const char* filename, Resolution res, ImageData_t* pDataOut); private: @@ -86,4 +115,3 @@ }; #endif -