mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
Merge "cwebp: fix WebPPictureHasTransparency call" into main
This commit is contained in:
commit
5000de5435
@ -1140,9 +1140,10 @@ int main(int argc, const char* argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
picture.use_argb = 1;
|
picture.use_argb = 1;
|
||||||
if (!ReadWebP(memory_writer.mem, memory_writer.size, &picture,
|
if (!ReadWebP(
|
||||||
/*keep_alpha=*/WebPPictureHasTransparency(&picture),
|
memory_writer.mem, memory_writer.size, &picture,
|
||||||
/*metadata=*/NULL)) {
|
/*keep_alpha=*/WebPPictureHasTransparency(&original_picture),
|
||||||
|
/*metadata=*/NULL)) {
|
||||||
fprintf(stderr, "Error! Cannot decode encoded WebP bitstream\n");
|
fprintf(stderr, "Error! Cannot decode encoded WebP bitstream\n");
|
||||||
fprintf(stderr, "Error code: %d (%s)\n", picture.error_code,
|
fprintf(stderr, "Error code: %d (%s)\n", picture.error_code,
|
||||||
kErrorMessages[picture.error_code]);
|
kErrorMessages[picture.error_code]);
|
||||||
|
Loading…
Reference in New Issue
Block a user