Merge "cwebp: fix WebPPictureHasTransparency call" into main

This commit is contained in:
James Zern 2022-08-11 16:55:40 +00:00 committed by Gerrit Code Review
commit 5000de5435

View File

@ -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]);