-
Notifications
You must be signed in to change notification settings - Fork 313
Closed
Description
Resizing perfectly square image using methods resizeToWidth(), resizeToHeight(), resizeToBestFit(), resizeToShortSide() and resizeToLongSide() is supposed to always produce image with the same width and height, but its not always the case because one of the size values is ratio scaled and then rounded down to lowest integer value via (int) cast conversion.
The easiest solution is to round scaled float value to closest integer value before type conversion. Ideally ratio scaling should be skipped completely when source width and height values are equal.
Metadata
Metadata
Assignees
Labels
No labels