-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Description
Hi!
I'm using SDWebImageWebPCoder to convert my images to WEBP and have stumbled upon what looks like a logic error in scaling with encodeMaxPixelSize
option.
The case looks like this:
- I have an image with size of 1253x403 and I'm trying to scale it to fit in 512x512 size
-
and it does nothing, the image's size remains 1253x403
-
I checked the code and found line 871 in SDImageWebPCoder:
What it says is that width and height of an image should be both larger than respective size values of encodeMaxPixelSize
option. So in my case I don't meet this condition because my height (403) is smaller than 512.
Shouldn't it be OR instead of AND in this condition?
For my case such fix works correctly: 1253x403 image has been scaled to 512x165 size
Please guide me if I'm missing something about this logic
Metadata
Metadata
Assignees
Labels
No labels