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
Application/bmp.h@22:f0d00f29bfeb, 2019-11-04 (annotated)
- Committer:
- embeddedartists
- Date:
- Mon Nov 04 14:31:50 2019 +0000
- Revision:
- 22:f0d00f29bfeb
- Parent:
- 0:4977187e90c7
More updates related to mbed OS 5
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 0:4977187e90c7 | 1 | /* ---------------------------------------------------------------------------- |
embeddedartists | 0:4977187e90c7 | 2 | * ATMEL Microcontroller Software Support - ROUSSET - |
embeddedartists | 0:4977187e90c7 | 3 | * ---------------------------------------------------------------------------- |
embeddedartists | 0:4977187e90c7 | 4 | * Copyright (c) 2006, Atmel Corporation |
embeddedartists | 0:4977187e90c7 | 5 | |
embeddedartists | 0:4977187e90c7 | 6 | * All rights reserved. |
embeddedartists | 0:4977187e90c7 | 7 | * |
embeddedartists | 0:4977187e90c7 | 8 | * Redistribution and use in source and binary forms, with or without |
embeddedartists | 0:4977187e90c7 | 9 | * modification, are permitted provided that the following conditions are met: |
embeddedartists | 0:4977187e90c7 | 10 | * |
embeddedartists | 0:4977187e90c7 | 11 | * - Redistributions of source code must retain the above copyright notice, |
embeddedartists | 0:4977187e90c7 | 12 | * this list of conditions and the disclaiimer below. |
embeddedartists | 0:4977187e90c7 | 13 | * |
embeddedartists | 0:4977187e90c7 | 14 | * - Redistributions in binary form must reproduce the above copyright notice, |
embeddedartists | 0:4977187e90c7 | 15 | * this list of conditions and the disclaimer below in the documentation and/or |
embeddedartists | 0:4977187e90c7 | 16 | * other materials provided with the distribution. |
embeddedartists | 0:4977187e90c7 | 17 | * |
embeddedartists | 0:4977187e90c7 | 18 | * Atmel's name may not be used to endorse or promote products derived from |
embeddedartists | 0:4977187e90c7 | 19 | * this software without specific prior written permission. |
embeddedartists | 0:4977187e90c7 | 20 | * |
embeddedartists | 0:4977187e90c7 | 21 | * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR |
embeddedartists | 0:4977187e90c7 | 22 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
embeddedartists | 0:4977187e90c7 | 23 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE |
embeddedartists | 0:4977187e90c7 | 24 | * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, |
embeddedartists | 0:4977187e90c7 | 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
embeddedartists | 0:4977187e90c7 | 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
embeddedartists | 0:4977187e90c7 | 27 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
embeddedartists | 0:4977187e90c7 | 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
embeddedartists | 0:4977187e90c7 | 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
embeddedartists | 0:4977187e90c7 | 30 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
embeddedartists | 0:4977187e90c7 | 31 | * ---------------------------------------------------------------------------- |
embeddedartists | 0:4977187e90c7 | 32 | */ |
embeddedartists | 0:4977187e90c7 | 33 | |
embeddedartists | 0:4977187e90c7 | 34 | #ifndef BMP_H |
embeddedartists | 0:4977187e90c7 | 35 | #define BMP_H |
embeddedartists | 0:4977187e90c7 | 36 | |
embeddedartists | 0:4977187e90c7 | 37 | //------------------------------------------------------------------------------ |
embeddedartists | 0:4977187e90c7 | 38 | // Exported types |
embeddedartists | 0:4977187e90c7 | 39 | //------------------------------------------------------------------------------ |
embeddedartists | 0:4977187e90c7 | 40 | |
embeddedartists | 0:4977187e90c7 | 41 | struct BMPHeader { |
embeddedartists | 0:4977187e90c7 | 42 | |
embeddedartists | 0:4977187e90c7 | 43 | unsigned short type; |
embeddedartists | 0:4977187e90c7 | 44 | unsigned int fileSize; |
embeddedartists | 0:4977187e90c7 | 45 | unsigned short reserved1; |
embeddedartists | 0:4977187e90c7 | 46 | unsigned short reserved2; |
embeddedartists | 0:4977187e90c7 | 47 | unsigned int offset; |
embeddedartists | 0:4977187e90c7 | 48 | unsigned int headerSize; |
embeddedartists | 0:4977187e90c7 | 49 | unsigned int width; |
embeddedartists | 0:4977187e90c7 | 50 | unsigned int height; |
embeddedartists | 0:4977187e90c7 | 51 | unsigned short planes; |
embeddedartists | 0:4977187e90c7 | 52 | unsigned short bits; |
embeddedartists | 0:4977187e90c7 | 53 | unsigned int compression; |
embeddedartists | 0:4977187e90c7 | 54 | unsigned int imageSize; |
embeddedartists | 0:4977187e90c7 | 55 | unsigned int xresolution; |
embeddedartists | 0:4977187e90c7 | 56 | unsigned int yresolution; |
embeddedartists | 0:4977187e90c7 | 57 | unsigned int ncolours; |
embeddedartists | 0:4977187e90c7 | 58 | unsigned int importantcolours; |
embeddedartists | 0:4977187e90c7 | 59 | |
embeddedartists | 0:4977187e90c7 | 60 | } __attribute__ ((packed)); |
embeddedartists | 0:4977187e90c7 | 61 | |
embeddedartists | 0:4977187e90c7 | 62 | //------------------------------------------------------------------------------ |
embeddedartists | 0:4977187e90c7 | 63 | // Exported functions |
embeddedartists | 0:4977187e90c7 | 64 | //------------------------------------------------------------------------------ |
embeddedartists | 0:4977187e90c7 | 65 | |
embeddedartists | 0:4977187e90c7 | 66 | extern unsigned char BMP_IsValid(void *file); |
embeddedartists | 0:4977187e90c7 | 67 | |
embeddedartists | 0:4977187e90c7 | 68 | extern unsigned int BMP_GetFileSize(void *file); |
embeddedartists | 0:4977187e90c7 | 69 | |
embeddedartists | 0:4977187e90c7 | 70 | extern unsigned char BMP_Decode( |
embeddedartists | 0:4977187e90c7 | 71 | void *file, |
embeddedartists | 0:4977187e90c7 | 72 | unsigned char *buffer, |
embeddedartists | 0:4977187e90c7 | 73 | unsigned int width, |
embeddedartists | 0:4977187e90c7 | 74 | unsigned int height, |
embeddedartists | 0:4977187e90c7 | 75 | unsigned char bpp, |
embeddedartists | 0:4977187e90c7 | 76 | unsigned char target_bpp); // 16 or 24 |
embeddedartists | 0:4977187e90c7 | 77 | |
embeddedartists | 0:4977187e90c7 | 78 | #endif //#ifndef BMP_H |
embeddedartists | 0:4977187e90c7 | 79 |