hm21 / pro_image_editor

The pro_image_editor is a Flutter widget designed for image editing within your application. It provides a flexible and convenient way to integrate image editing capabilities into your Flutter project.
https://hm21.github.io/pro_image_editor/
BSD 3-Clause "New" or "Revised" License
115 stars 69 forks source link

Focal Point #172

Closed robertjones26 closed 2 months ago

robertjones26 commented 2 months ago

Platforms

Android, iOS, Web, Windows, macOS, Linux

Description

Would it be possible to add a feature called Focal Point. You would set the focal point of the image to when you are going responsive. Critical on tablets on mobile.

Why

When displaying images on our website, it would center the image with the applied Focal Point. We use images in Banner Adds, Info Blocks, etc, when going responsive on small tablets, phones it is critical to have the image centered. So the main part of the image is always centered. The image may be bigger than the area of display, so the focal point would always center the image in the responsive area.

robertjones26 commented 2 months ago

https://jonom.github.io/jquery-focuspoint/demos/grid/lizard.html https://jonom.github.io/jquery-focuspoint/demos/grid/kangaroo.html

image_2024-07-25_082918721

hm21 commented 2 months ago

Hi,

Technically, it's possible to do this, but to be honest, I think it makes sense to display images, but in use with an image editor it's a rare case that someone needs this feature. However, if you want to create a pull request, I would love to review it, but for now, I will close this future request.

FYI: If you wish to create a faster solution just for yourself, I recommend wrapping the image editor inside the Transform widget, where you focus the specific point with your logic. In this case, you can disable the appbar and bottombar in the image editor and add it outside the Transform widget so that only the image will be zoomed and all the logic inside the editor will still work.