blissd / fotema

Photo gallery for Linux
78 stars 8 forks source link

Please use XDG thumbnail specification #147

Open mgorny opened 2 months ago

mgorny commented 2 months ago

Please add support for the Thumbnail Managing Standard. This would make it possible for Fotema to use the same thumbnail directory as other programs on the system, both saving a lot of time on having to generate thumbnails twice, and a lot of space on having to store two sets of thumbnails.

blissd commented 2 months ago

Thank you for the suggestion. I didn't know about that and will take a look.

blissd commented 2 months ago

I've read the thumbnail standard and I don't think it will work for Fotema. The standard would like thumbnails to preserve the aspect ratio of the source image, which I don't do because I crop image to a be square before resizing. For me, this makes the album views more attractive than I've seen in applications that just scale the image with no cropping.

However, if at some point Fotema gains a function to change album view thumbnails to preserve the aspect ratio, then I'll look at this again.

Vinnl commented 2 months ago

Wouldn't it be more efficient to crop the existing thumbnails to a square? Since that operates on smaller images, I'd (perhaps naively) expect that to have less battery impact.

blissd commented 2 months ago

Hi @Vinnl. I'm sure it would be more efficient to crop an existing thumbnail than generating a new one. I am still wondering about this this request.

I like the proposed advantages of the thumbnail specification, assuming it all works out. Right now I'm not sure how it works with flatpak'd apps.

0chroma commented 1 month ago

I feel like cropping XDG thumbnails to a square should be fast enough that you could potentially do it while drawing the UI. I might experiment with that when I feel confident enough with relm4 (still learning)

blissd commented 1 month ago

Thanks for taking a look @0chroma.

blissd commented 1 month ago

Hmmm... I'm currently working on letting users select which directory to use for their picture library and also removing the static file system permission for the pictures directory. The side-effect of this is that Fotema won't see the real file path for any picture, but instead will see a path starting with /run/user/$UID/doc/$DOCID/.... I don't know how this will work with the thumbnail spec requirement that thumbnail names are a hash of the file path.