previewgenerator icon indicating copy to clipboard operation
previewgenerator copied to clipboard

Preview Generator + Memories - the minimal amout of preview files

Open opalek84 opened this issue 1 year ago • 1 comments

Hello, I use Nextcloud Hub 9 v.30.0.2 + PG 5.7.0 + Memories 7.4.1

What is an idea: The absolute minimum of previews generated by Preview Generator for Memories APP

What I have: Two images: A.jpg 1960x4032 and B.jpg 4032x1960 and configuration: -preview_max_x = preview_max_y = 1024 -squareSizes = '', squareUncroppedSizes ='256', widthSizes='', heightSizes=''

After run generate-all, the Preview Generator will generate: For A.jpg 125-256.jpg 498-1024-max.jpg

For B.jpg 256-125.jpg 1024-498-max.jpg

What I need: For A.jpg 256-526.jpg (something like squareUncroppedSizes but as a value for the shorter edge, similarly to widthSizes/heightSizes) 498-1024-max.jpg

For B.jpg 526-256.jpg 1024-498-max.jpg

I know that I can use the widthSizes='256', heightSizes='256', but this will generate 3 files: 125-256.jpg 256-125.jpg 498-1024-max.jpg

Any idea how to achieve this? This is a Bug or Feature?

opalek84 avatar Dec 17 '24 23:12 opalek84

This is a feature request. We would need a setting for generating squareUncroppedSizes but use it for the shorter edge, as you said.

st3iny avatar Dec 28 '24 13:12 st3iny

I implement the config option and just pushed a new release v5.9.0.

After updating the app you can use the following command to generate the previews for the timeline view of the Memories app:

occ config:app:set --value="256" previewgenerator coverWidthHeightSizes

st3iny avatar Jul 12 '25 17:07 st3iny

Perfect! I just tested and it works as intended. Thank you very much :)

opalek84 avatar Jul 13 '25 18:07 opalek84