Tuba icon indicating copy to clipboard operation
Tuba copied to clipboard

Support displaying cropped images with focal points

Open bertob opened this issue 2 years ago • 5 comments

On the official web app you can set a focal point for images, which is cool to draw attention to specific parts of the image when it's cropped (e.g. in this case the top part is more interesting than the center):

image

bertob avatar Oct 01 '23 16:10 bertob

Yup, that's issue #173 which also has some technical reference details ;)

nekohayo avatar Oct 16 '23 22:10 nekohayo

I'll split them into two issues, this one about displaying them and the other one about setting them since they are different implementation wise.

The main issue with implementing this is that Gtk.Picture is sealed (cannot be subclassed) so the only way to change the way the image is displayed (outside of the predefined options (cover, content fit etc)) is by re-creating Gtk.Picture from scratch (or at least that's my understanding of the situation)

GeopJr avatar Oct 16 '23 23:10 GeopJr

outside of the predefined options (cover, content fit etc)

Might be worth filing a GTK issue asking if this could be in scope to be added to GtkPicture in the future?

bertob avatar Oct 30 '23 15:10 bertob

I'll investigate our other GtkPicture needs further first to see if we actually do need more than GtkPicture can provide (specifically, sizing/aspect ratio (#180), animated images (#196, #435) (I believe the aspect ratio one does require more control over the widget))

GeopJr avatar Nov 01 '23 23:11 GeopJr

I'd suggest retitling this ticket to "Support displaying cropped images with focal points" to avoid confusion with the editing part (#173).

nekohayo avatar Nov 24 '23 02:11 nekohayo