MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_image_utils.h
Go to the documentation of this file.
1 // DOM-IGNORE-BEGIN
2 /*******************************************************************************
3 * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries.
4 *
5 * Subject to your compliance with these terms, you may use Microchip software
6 * and any derivatives exclusively with Microchip products. It is your
7 * responsibility to comply with third party license terms applicable to your
8 * use of third party software (including open source software) that may
9 * accompany Microchip software.
10 *
11 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
12 * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
13 * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
14 * PARTICULAR PURPOSE.
15 *
16 * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
17 * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
18 * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
19 * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
20 * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
21 * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
22 * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
23 *******************************************************************************/
24 // DOM-IGNORE-END
25 
26 /*******************************************************************************
27  Module for Microchip Graphics Library - Legato User Interface Library
28 
29  Company:
30  Microchip Technology Inc.
31 
32  File Name:
33  gfx_image_utils.h
34 
35  Summary:
36  Image return utilities
37 
38  Description:
39  Internal library use only
40 *******************************************************************************/
41 
49 // DOM-IGNORE-BEGIN
50 #ifndef LE_IMAGE_UTILS_H
51 #define LE_IMAGE_UTILS_H
52 //DOM-IGNORE-END
53 
55 
56 // DOM-IGNORE-BEGIN
57 
58 // *****************************************************************************
59 /* Function:
60  uint32_t leGetRLEDataAtIndex(uint8_t* data,
61  uint32_t max,
62  uint32_t idx,
63  uint32_t* startBlock,
64  uint32_t* startOffset)
65 
66  Summary:
67  Gets an RLE data value at the given index.
68 
69  Parameters:
70  uint8_t* data - the data buffer to query
71  uint32_t max - the maximum size of the buffer
72  uint32_t idx - the index to query for
73  uint32_t* startBlock - the block to start at, initialize to zero
74  uint32_t* startOffset - the offset to start at, initialize to zero
75 
76  Returns:
77  leResult
78 */
79 uint32_t leGetRLEDataAtIndex(uint8_t* data,
80  uint32_t max,
81  uint32_t idx,
82  uint32_t* startBlock,
83  uint32_t* startOffset);
84 
85 // *****************************************************************************
86 /* Function:
87  uint32_t lleGetDiscreteValueAtIndex(uint32_t index,
88  uint32_t value,
89  leColorMode mode)
90 
91  Summary:
92  Gets a discrete color value from an index. Capable of doing sub-byte
93  value retrieval.
94 
95  Parameters:
96  uint32_t index - the index value
97  uint32_t value - the data value to query
98  leColorMode mode - the color mode of the data
99 
100  Returns:
101  leResult
102 */
103 uint32_t leGetDiscreteValueAtIndex(uint32_t index,
104  uint32_t value,
105  leColorMode mode);
106 
107 // *****************************************************************************
108 /* Function:
109  uint32_t leGetOffsetFromIndexAndBPP(uint32_t index,
110  leBitsPerPixel bpp)
111 
112  Summary:
113  Gets an offset in bytes of a pixel index and a BPP mode.
114 
115  Parameters:
116  uint32_t index - the index value
117  leBitsPerPixel bpp - the bpp value of the data
118 
119  Returns:
120  leResult
121 */
122 uint32_t leGetOffsetFromIndexAndBPP(uint32_t index,
123  leBitsPerPixel bpp);
124 
125 
126 // DOM-IGNORE-END
127 
128 #endif /* LE_IMAGE_UTILS_H */
Image functions and defintions.
leColorMode
This enum represents the supported RGB color formats.
Definition: legato_color.h:148
leBitsPerPixel
This enum represents the bits per pixel (bpp) options.
Definition: legato_color.h:185