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

Minimum width and height in pixels #30

Open
monsieurtanuki opened this issue Jun 22, 2023 · 1 comment
Open

Minimum width and height in pixels #30

monsieurtanuki opened this issue Jun 22, 2023 · 1 comment

Comments

@monsieurtanuki
Copy link
Contributor

In my app, I'm not supposed to crop into too small a picture, because the cropped image will then be rejected by the server I upload to.
In my particular case, we have a minimum width and a minimum height. It's even more complicated, the dimensions are ok if width >= minimumWidth OR height >= minimumHeight.

How could we implement those limits in crop_image?
Perhaps we should add a method to the controller, null by default, that checks if the dimensions are OK and recomputes the new dimensions if needed.
A method to be implemented by the app developer if needed in each specific case, for more flexibility.

cf. openfoodfacts/smooth-app#4219

@deakjahn
Copy link
Owner

deakjahn commented Jun 22, 2023

Yes, an additional field (maybe not a method, just a field) would be good.

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

2 participants