mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
fix WebPIDecGetRGB() to accept any RGB(A) mode, not just MODE_RGB
Change-Id: I8780582ecd0868c84e2b1310addebd6c8989e727
This commit is contained in:
parent
8aa50efd38
commit
ca554137d2
@ -538,9 +538,9 @@ VP8StatusCode WebPIUpdate(WebPIDecoder* const idec, const uint8_t* data,
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
uint8_t* WebPIDecGetRGB(const WebPIDecoder* const idec, int *last_y,
|
||||
int* width, int* height, int* stride) {
|
||||
if (!idec || !idec->dec_ || idec->params_.mode != MODE_RGB ||
|
||||
uint8_t* WebPIDecGetRGB(const WebPIDecoder* const idec, int *last_y, int* width,
|
||||
int* height, int* stride) {
|
||||
if (!idec || !idec->dec_ || idec->params_.mode == MODE_YUV ||
|
||||
idec->state_ <= STATE_PARTS0) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -178,10 +178,11 @@ VP8StatusCode WebPIAppend(WebPIDecoder* const idec, const uint8_t* data,
|
||||
VP8StatusCode WebPIUpdate(WebPIDecoder* const idec, const uint8_t* data,
|
||||
uint32_t data_size);
|
||||
|
||||
// Returns the RGB image decoded so far. Returns NULL if output params are not
|
||||
// initialized yet. *last_y is the index of last decoded row in raster scan
|
||||
// order. Some pointers (*last_y, *width etc.) can be NULL if corresponding
|
||||
// information is not needed.
|
||||
// Returns the r/g/b/(a) image decoded so far. Returns NULL if output params
|
||||
// are not initialized yet. The r/g/b/(a) output type corresponds to the mode
|
||||
// specified in WebPINew()/WebPINewRGB(). *last_y is the index of last decoded
|
||||
// row in raster scan order. Some pointers (*last_y, *width etc.) can be NULL if
|
||||
// corresponding information is not needed.
|
||||
uint8_t* WebPIDecGetRGB(const WebPIDecoder* const idec, int *last_y,
|
||||
int* width, int* height, int* stride);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user