You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I guess I've misunderstood how the dimenstions work. Normally these compression APIs try to avoid cropping and changing ratio of original, but this one does, so I guess I've misunderstood how the minWidth & minHeight work. If I set those values lower than the original, I get the top and bottom missing (assuming height is the constraint). With other compression libraries, I expect to find a 'maxHeight' parameter rather than the minimum one (at least its name that) in yours this one, and it is usually used in an algorithm seeking to reduce the max constraint (h or w) depending on if / either goes over the maximums defined. Then calculating a scale value while maintaining the original ratio. However, this one seems to crop the original if it receives an original out of bounds to the 'min' values. By the way, not sure how they are 'minimal' exactly, if the original is higher they are ignored, if not they are taken to be the maximum size. At least that seems to be how it behaves.
The example dart code to exemplify how the kotlin behaves doesn't result in the same numbers by the way.
My code
No response
Try do it
No response
The text was updated successfully, but these errors were encountered:
Platforms
dart, Android, iOS
Description
I guess I've misunderstood how the dimenstions work. Normally these compression APIs try to avoid cropping and changing ratio of original, but this one does, so I guess I've misunderstood how the minWidth & minHeight work. If I set those values lower than the original, I get the top and bottom missing (assuming height is the constraint). With other compression libraries, I expect to find a 'maxHeight' parameter rather than the minimum one (at least its name that) in yours this one, and it is usually used in an algorithm seeking to reduce the max constraint (h or w) depending on if / either goes over the maximums defined. Then calculating a scale value while maintaining the original ratio. However, this one seems to crop the original if it receives an original out of bounds to the 'min' values. By the way, not sure how they are 'minimal' exactly, if the original is higher they are ignored, if not they are taken to be the maximum size. At least that seems to be how it behaves.
The example dart code to exemplify how the kotlin behaves doesn't result in the same numbers by the way.
My code
No response
Try do it
No response
The text was updated successfully, but these errors were encountered: