Add an API to import a color-mapped image.

Change-Id: I71421a1a706a74d184a24dc9276b55005d7457b5
This commit is contained in:
Vincent Rabaud
2016-09-23 13:23:10 +02:00
parent 30d43706d3
commit 18a9a0ab57
2 changed files with 40 additions and 0 deletions

View File

@ -42,6 +42,15 @@ WEBP_EXTERN(int) WebPImportRGB565(const uint8_t* rgb565, WebPPicture* pic);
// width and height must be set prior to calling this function.
WEBP_EXTERN(int) WebPImportRGB4444(const uint8_t* rgb4444, WebPPicture* pic);
// Import a color mapped image. The number of colors is less or equal to
// MAX_PALETTE_SIZE. 'pic' must have been initialized. Its content, if any,
// will be discarded. Returns 'false' in case of error, or if indexed[] contains
// invalid indices.
WEBP_EXTERN(int)
WebPImportColorMappedARGB(const uint8_t* indexed, int indexed_stride,
const uint32_t palette[], int palette_size,
WebPPicture* pic);
//------------------------------------------------------------------------------
// Parse a bitstream, search for VP8 (lossy) header and report a