bpatrik / pigallery2

A fast directory-first photo gallery website, with rich UI, optimized for running on low resource servers (especially on raspberry pi)
http://bpatrik.github.io/pigallery2/
MIT License
1.81k stars 210 forks source link

Merge Previews and thumbnail generation #806

Open bpatrik opened 11 months ago

bpatrik commented 11 months ago

Merge thumbnail and photo previews, so the app can handle them the same way and interchangeably use them.

This will also help with raw photo support.

bpatrik commented 11 months ago

NOTE: this commit will most likely trigger a full thumbnail recreation

rhatguy commented 11 months ago

Was it intentional to change the thumbnail preview sizes? Seems like new larger options were added with this commit (1080 and 2160) which were not there previously. Could be my lack of understanding in the purpose of this change.

bpatrik commented 10 months ago

Yes. I wanted to increase the thumbnail sizes for better look. You can override them to the previous values: should be something like 240, 480, 1080.

This change merges thumbnails with previews. So there is only one list of sizes to maintain. App will load the one that fits the best to the thumbnail or preview bounding box.

bpatrik commented 10 months ago

also adding 2160 size adds 4k preview support.

tschaerni commented 10 months ago

I couldn't find any hint anywhere, and because my question has to do with thumbnail generation, I thought I'd ask here: Is there are way to pre generate the thumbnails? I have about 900GB of pictures, and some of them are very high resolution, and it takes sometimes up to 5-10 min for a full folder to generate the thumbnails, which is rather annoying.

If there isn't a way to pre generate all thumbnails, maybe that could be added as a feature? Would help a lot with the initial setup, especially if you have a big gallery.

Cheers

rhatguy commented 10 months ago

Thats what the "Photo converting" job does. If you check in settings you can select what preview sizes you want it to generate and when you execute the job it will run through your entire collection and pre-generate the previews for each of those sizes.

tschaerni commented 10 months ago

Thats what the "Photo converting" job does. If you check in settings you can select what preview sizes you want it to generate and when you execute the job it will run through your entire collection and pre-generate the previews for each of those sizes.

Thanks for that tipp! I seem to have overlooked the thumbnail generation button ^^'

PS: It tells me it'll take 4h to do so >.<

bpatrik commented 9 months ago

The best settings depends on your setup. If you have a powerful machine:

Save CPU -> pre generate thumbnail Save network -> more thumbnail sizes Save disk -> do not pregenerate Better image quality -> bigger thumbnail sizes

I use the def. settings. I usually only pregenerate the smallest thumbnail. The app will do on demand the rest. I'm using now an Intel NUC. Earlier on reaspberry i pregenerated more.