Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should it be cropping and changing ratio? #286

Open
DannyJoinedApps opened this issue Feb 20, 2024 · 0 comments
Open

Should it be cropping and changing ratio? #286

DannyJoinedApps opened this issue Feb 20, 2024 · 0 comments

Comments

@DannyJoinedApps
Copy link

DannyJoinedApps commented Feb 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant