mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
Rename and improve the API to retrieve decoded area
Change-Id: Iec7e0a1361c27dcf2dc8445170ab5b400454fce9
This commit is contained in:
committed by
James Zern
parent
bf599d74a4
commit
c558bdad28
@ -578,10 +578,20 @@ static const WebPDecBuffer* GetOutputBuffer(const WebPIDecoder* const idec) {
|
||||
return idec->params_.output;
|
||||
}
|
||||
|
||||
const WebPDecBuffer* WebPIDecGetSamples(const WebPIDecoder* const idec,
|
||||
int* last_y) {
|
||||
const WebPDecBuffer* WebPIDecodedArea(const WebPIDecoder* const idec,
|
||||
int* const left, int* const top,
|
||||
int* const width, int* const height) {
|
||||
const WebPDecBuffer* const src = GetOutputBuffer(idec);
|
||||
if (last_y) *last_y = idec->params_.last_y;
|
||||
if (left) *left = 0;
|
||||
if (top) *top = 0;
|
||||
// TODO(skal): later include handling of rotations.
|
||||
if (src) {
|
||||
if (width) *width = src->width;
|
||||
if (height) *height = idec->params_.last_y;
|
||||
} else {
|
||||
if (width) *width = 0;
|
||||
if (height) *height = 0;
|
||||
}
|
||||
return src;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user