mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
cwebp: fix WebPPictureHasTransparency call
when near_lossless is < 100; previously the zeroed 'picture' would be passed in the check rather than the original picture. this would result in alpha never been kept in the decode. Change-Id: I6af3aef7de2d672e044025d975d8180b12d5fa40
This commit is contained in:
parent
866e349cef
commit
c626e7d544
@ -1140,8 +1140,9 @@ int main(int argc, const char* argv[]) {
|
||||
}
|
||||
|
||||
picture.use_argb = 1;
|
||||
if (!ReadWebP(memory_writer.mem, memory_writer.size, &picture,
|
||||
/*keep_alpha=*/WebPPictureHasTransparency(&picture),
|
||||
if (!ReadWebP(
|
||||
memory_writer.mem, memory_writer.size, &picture,
|
||||
/*keep_alpha=*/WebPPictureHasTransparency(&original_picture),
|
||||
/*metadata=*/NULL)) {
|
||||
fprintf(stderr, "Error! Cannot decode encoded WebP bitstream\n");
|
||||
fprintf(stderr, "Error code: %d (%s)\n", picture.error_code,
|
||||
|
Loading…
Reference in New Issue
Block a user