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

Wish: Improve anchor parameter #594

Open
iJungleboy opened this issue Feb 28, 2022 · 10 comments
Open

Wish: Improve anchor parameter #594

iJungleboy opened this issue Feb 28, 2022 · 10 comments

Comments

@iJungleboy
Copy link

iJungleboy commented Feb 28, 2022

At the moment the url allows for ?anchor=topcenter to make sure cropping behaves as we need it to when the image is auto-cropped.

But we would like to give our users much more control - but automatically. The idea is that they could mark an area on the image which is important, and the cropper would use this to limit what must stay inside the result, and what can be cropped.

Something like ?anchor=bottomright&focus=22-67,50-90

The core idea is that the content-editor could select a rectangle on the image determining what's really important - and therefor must stay in the image no matter how we crop it. The example above would have been in %, so the important bits of the above example would be:

  1. Within the width from 22% to 67%
  2. Within the height of 50% to 90%

Based on this, and also because bottom-right is the anchor, the image would try to crop ensuring that this area will be visible, and expand to top-left from the 67%/90% corner.

Of course it would need to do various corrections if the image doesn't fit.

We believe this would be super-useful for many CMS scenarios, and would also help write the code if you see this is a useful addition.

Note: I noticed this is somehow similar to what the gravity in the JSON configuration would do. Maybe it would also be enough to allow a gravity-parameter in the url-syntax?

@lilith
Copy link
Member

lilith commented Feb 28, 2022 via email

@iJungleboy
Copy link
Author

I love you even more 😘

@iJungleboy
Copy link
Author

BTW: there has been no activity on this for almost 9 months. Is there a code freeze or something? Any chance such a feature would be implemented any time soon?

@lilith
Copy link
Member

lilith commented May 14, 2022

No, no code freeze, just a series of unfortunate events. It's still high on the list

@iJungleboy
Copy link
Author

Thanks!
Anything we could do to accellerate this?

@lilith lilith added the ! label Jun 9, 2022
@lilith
Copy link
Member

lilith commented Sep 29, 2022

This overlaps with #602

@iJungleboy
Copy link
Author

ping ? 😉

@lilith
Copy link
Member

lilith commented Jan 10, 2024 via email

@lilith
Copy link
Member

lilith commented Jan 10, 2024 via email

@iJungleboy
Copy link
Author

So 1. what you're doing sounds insane! and awesome 💃.

Would love to do some code review, but not sure if I'm qualified enough 😉 - sounds pretty hard core.

The direction etc. is an issue. I remember explaining my expected gravity behavior here #602 that may help a bit.

I'm pretty sure gravity would have to be based on the selected area.

Percent probably in 33.3 format.

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

No branches or pull requests

2 participants