-
-
Notifications
You must be signed in to change notification settings - Fork 952
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
Constrained crop aspect ratio in range #519
Comments
I guess |
Hey @inamiy! Long time no see! I hope you've been going well! 😁 Hmm, interesting! So the idea is to have an "aspect ratio" range that the crop box can change shape inside? Yeah, I feel like the delegate would be too late for that, but maybe it's not so hard to change the Do you have some examples of some input/output images you would like to see from this sort of feature? |
Yes, it's about restricting the crop box size to not become too long on one side! I don't have a clear image yet on how the UX will be like. I think auto-resizing is the easiest start, as well as providing its delegate method so that dev can additionally present custom HUD for warning message. Crop-box size error detection timing is also another thing to consider. |
One another idea is to have a crop-box frame to have a 🟥 red color during |
Hi @TimOliver 👋
Is it possible to control the result image size to be within certain aspect-ratio range?
For example, suppose dev wants to have square-ish image (1:1) which can be vertically long at most by 9:16.
In such case, if user controls grid to be vertically longer than 9:16, the grid automatically force-shrinks down to max 9:16.
I have taken a quick look at the code if delegate calls can be a good place to tweak the aspect ratio of the grid, but seemed it's not an easy fix.
It will be nice if there is a quick way of handling this kind of constrained aspect ratio, and also would be nicer if there will be such property, e.g.:
(P.S. Using
ClosedRange
is better, but probably not possible as aspect-ratio usesCGSize
and also needs to be interpretable in ObjC!)The text was updated successfully, but these errors were encountered: