mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-19 02:12:52 +01:00
WebPIoInitFromOptions: treat use_cropping as a bool
this matches the description in WebPDecoderOptions and prevents a mismatch between the user supplied options and the ones used by io. Bug: chromium:1196480 Change-Id: Id464f999d737078078f9d21afe25b349317f5ab4
This commit is contained in:
parent
595fa13f83
commit
3b12b7f4b4
@ -799,7 +799,7 @@ int WebPIoInitFromOptions(const WebPDecoderOptions* const options,
|
||||
int x = 0, y = 0, w = W, h = H;
|
||||
|
||||
// Cropping
|
||||
io->use_cropping = (options != NULL) && (options->use_cropping > 0);
|
||||
io->use_cropping = (options != NULL) && options->use_cropping;
|
||||
if (io->use_cropping) {
|
||||
w = options->crop_width;
|
||||
h = options->crop_height;
|
||||
|
Loading…
x
Reference in New Issue
Block a user