Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Previews sometimes looks pixelized #49

Closed
skjnldsv opened this issue Dec 17, 2019 · 3 comments · Fixed by #68
Closed

Previews sometimes looks pixelized #49

skjnldsv opened this issue Dec 17, 2019 · 3 comments · Fixed by #68
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working performances Performances issues and optimisations
Milestone

Comments

@skjnldsv
Copy link
Member

skjnldsv commented Dec 17, 2019

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

@skjnldsv skjnldsv added bug Something isn't working 0. Needs triage Pending approval or rejection. This issue is pending approval. performances Performances issues and optimisations labels Dec 17, 2019
@skjnldsv skjnldsv added this to the 1.1.0 milestone Dec 17, 2019
@rullzer
Copy link
Member

rullzer commented Dec 17, 2019

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

@skjnldsv
Copy link
Member Author

skjnldsv commented Dec 22, 2019

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’écran_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)

@skjnldsv
Copy link
Member Author

Just tried it, works nicely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working performances Performances issues and optimisations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants