Photos: Previews sometimes looks pixelized

Created on 17 Dec 2019  路  3Comments  路  Source: nextcloud/photos

Because we generate previews with size in power of 4, the images preview are loaded with 256px. The next step is 1024 which is a lot more data to load

cc @jancborchardt @rullzer

0. Needs triage bug performances

Most helpful comment

Ah, I understand why.

The preview manager use the maximum, meaning if your picture is 2560*1000, and you request for a 256px, instead of being 655x256, it will be 256x100 (which make sense)
But since we're cropping the images and fitting them to a square...

The preview manager have an option to request a square (&a=false) but the cropping is not centered, so maybe we could fix this?
Because this works well in landscapes, but not in portrait
Capture d鈥櫭ヽran_2019-12-22_14-50-03

(cropping is done for the width, but not the height: https://github.com/nextcloud/server/blob/5bf3d1bb384da56adbf205752be8f840aac3b0c5/lib/private/Preview/Generator.php#L388)

All 3 comments

Yeah. This is how it is for now. I have no real solution yet.

Ah, I understand why.

The preview manager use the maximum, meaning if your picture is 2560*1000, and you request for a 256px, instead of being 655x256, it will be 256x100 (which make sense)
But since we're cropping the images and fitting them to a square...

The preview manager have an option to request a square (&a=false) but the cropping is not centered, so maybe we could fix this?
Because this works well in landscapes, but not in portrait
Capture d鈥櫭ヽran_2019-12-22_14-50-03

(cropping is done for the width, but not the height: https://github.com/nextcloud/server/blob/5bf3d1bb384da56adbf205752be8f840aac3b0c5/lib/private/Preview/Generator.php#L388)

Just tried it, works nicely!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bodenseematze picture Bodenseematze  路  7Comments

phenomax picture phenomax  路  3Comments

svenb1234 picture svenb1234  路  8Comments

grenzverkehr picture grenzverkehr  路  7Comments

xf- picture xf-  路  9Comments