#include <gfx_image_pixelformat_indexed.h>
PixelFormatIndexedColorInterface extends the PixelFormatInterface with the ability to handle color palettes/tables.
◆ MAXON_INTERFACE()
◆ InitColorTable()
Initialize the pixel format with a specific number of color entries and a given pixel format for the color entries.
- Parameters
-
[in] | count | Number of color entries in the table. |
[in] | srcFormatPtr | Pixel format of the color entries. |
- Returns
- OK on success.
◆ GetColorTablePixelFormat()
Returns the pixel format of the color table.
◆ GetColorTableSize()
Returns the number of color entries.
◆ SetIndex()
Sets a specific color entry.
- Parameters
-
[in] | idx | Index of the entry to set. |
[in] | srcPixelData | Source color data. The color will be automatically converted into the color format provided in the Init function. |
- Returns
- OK on success.
◆ GetIndex()
Returns a single color entry from the color table.
- Parameters
-
[in] | idx | Index of the entry to get. |
[in] | dstPixelData | Destination color pointer. The color will be automatically converted into the color format provided in the dstPixelData. |
- Returns
- OK on success.