mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-17 14:29:48 +02:00
add support for RGB565, ARGB4444 and ARGB colorspace (decoder)
RGB565 and ARGB4444 are only supported through the advanced decoding API. ARGB being somewhat generic, there's an easy WebPDecodeARGB() new function for convenience. Patch by Vikas Arora (vikaas dot arora at gmail dot com) Change-Id: Ic7b6f72bd70aca458d14e7fdd23679212430ebca
This commit is contained in:
@ -42,6 +42,10 @@ uint8_t* WebPDecodeRGB(const uint8_t* data, uint32_t data_size,
|
||||
uint8_t* WebPDecodeRGBA(const uint8_t* data, uint32_t data_size,
|
||||
int* width, int* height);
|
||||
|
||||
// Same as WebPDecodeRGBA, but returning ARGB data.
|
||||
uint8_t* WebPDecodeARGB(const uint8_t* data, uint32_t data_size,
|
||||
int* width, int* height);
|
||||
|
||||
// This variant decode to BGR instead of RGB.
|
||||
uint8_t* WebPDecodeBGR(const uint8_t* data, uint32_t data_size,
|
||||
int* width, int* height);
|
||||
@ -102,7 +106,11 @@ uint8_t* WebPDecodeYUVInto(const uint8_t* data, uint32_t data_size,
|
||||
// Colorspaces
|
||||
typedef enum { MODE_RGB = 0, MODE_RGBA = 1,
|
||||
MODE_BGR = 2, MODE_BGRA = 3,
|
||||
MODE_YUV = 4, MODE_YUVA = 5 // yuv 4:2:0
|
||||
MODE_ARGB = 4, MODE_ARGB_4444 = 5,
|
||||
MODE_RGB_565 = 6,
|
||||
// YUV modes must come after RGB ones.
|
||||
MODE_YUV = 7, MODE_YUVA = 8, // yuv 4:2:0
|
||||
MODE_LAST = 9
|
||||
} WEBP_CSP_MODE;
|
||||
|
||||
// Generic structure for describing the sample buffer.
|
||||
|
Reference in New Issue
Block a user