mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 13:59:51 +02:00
add a decoding option to flip image vertically
New API options: WebPDecoderOptions.flip and 'dwebp -flip ...' it uses negative stride trick. Also changed the decoder code to support user-supplied buffers with negative stride, independently of the WebPDecoderOptions.flip value. Change-Id: I4dc0d06f0c87e51a3f3428be4fee2d6b5ad76053
This commit is contained in:
@ -512,6 +512,10 @@ static VP8StatusCode DecodeInto(const uint8_t* const data, size_t data_size,
|
||||
if (status != VP8_STATUS_OK) {
|
||||
WebPFreeDecBuffer(params->output);
|
||||
}
|
||||
|
||||
if (params->options != NULL && params->options->flip) {
|
||||
status = WebPFlipBuffer(params->output);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user