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

Increase default quality for previews to e.g. 90 or 95 #20665

Closed
maddylliieeee opened this issue Nov 21, 2015 · 14 comments
Closed

Increase default quality for previews to e.g. 90 or 95 #20665

maddylliieeee opened this issue Nov 21, 2015 · 14 comments

Comments

@maddylliieeee
Copy link

maddylliieeee commented Nov 21, 2015

Re-Opened owncloud/gallery#465

Steps to reproduce

Upload a bunch of photos to your OC
Open the Gallery app for these photos
Open a single photo (slideshow view)

Expected behaviour

Assuming uploaded photos had proper resolution a sharp photo should appear.

Actual behaviour

The resolution of the displayed photo fits (so this is not a duplicate to those issues pointing to resolution) but compression artifacts are visible.
Probably due to a low quality on JPEG compression?

Server configuration

** Operating system: **
Ubuntu 14.04 LTS
** Web server: **
Apache/2.4.7 (Ubuntu)
** Database: **
MySQL
** PHP version: **
PHP/5.5.9-1ubuntu4.14 OpenSSL/1.0.1f configured
** ownCloud version: ** (see ownCloud admin page)
8.2.1

Updated from an older ownCloud or fresh install:

from 8.1.4, didn't test before 8.2.1 however

Request/Suggestion

Increase preview quality from 75 to at least 90, better 95. Because in full screen as well as in previews already lot's of artifacts are visible.

@karlitschek
Copy link
Contributor

@georgehrke What do you think?

@georgehrke
Copy link
Contributor

@georgehrke What do you think?

Sounds reasonable, especially for retina screens.

Open a single photo (slideshow view)

@oparoz Does the gallery app use thumbnails for full screen preview?

@oparoz
Copy link
Contributor

oparoz commented Nov 21, 2015

@georgehrke - The Gallery app uses the cached previews in order to not serve a 20MP photo to a 1024x768 tablet. The original can always be downloaded and there is also a plan to download it in the background if the user zooms in.

I think the change is trivial, but it should be a config setting. That way people wanting better quality could change the settings and re-generate all thumbnails.

Since I think it would be difficult to detect a setting change, we would have to let users manually re-generate thumbnails.

@maddylliieeee
Copy link
Author

A config-setting would be perfect, really!

@MorrisJobke
Copy link
Contributor

Since I think it would be difficult to detect a setting change, we would have to let users manually re-generate thumbnails.

No. Please no setting for such stuff. We should do it in the correct way and not hide this behind yet another setting. Everybody wants sharp images not only the people who know a magic setting.

@georgehrke
Copy link
Contributor

Yep, I'd say go without a setting as well.

@georgehrke georgehrke self-assigned this Nov 23, 2015
@maddylliieeee
Copy link
Author

What about increasing the default but provide a setting to reduce it again? Some people may still like the option to reduce the size of the images.

@oparoz
Copy link
Contributor

oparoz commented Nov 23, 2015

No. Please no setting for such stuff. We should do it in the correct way and not hide this behind yet another setting.

OK, the correct way is to use a better default for the max preview, but then you'l have to introduce a check and use a lower value for previews smaller than 256x256 per example. That way you still have proper thumbnails.

@oparoz
Copy link
Contributor

oparoz commented Nov 23, 2015

It doesn't change the fact that this will have zero effect on existing installations.

@Jaimy85
Copy link

Jaimy85 commented Jan 4, 2016

You can change line 321 in lib/private/image.php to
$res = imagejpeg($this->resource, NULL, 95);

@MorrisJobke
Copy link
Contributor

ge.php to
$res = imagejpeg($this->resource, NULL, 95);

#21437

MorrisJobke added a commit that referenced this issue Jan 4, 2016
@MorrisJobke MorrisJobke removed their assignment Apr 5, 2016
@meisterleise
Copy link

okay, it's an old post, but the image quality is still bad with this plugin.
Can someone please tell me where I can find this line $res to change the quality?
I can't find it!

@maddylliieeee
Copy link
Author

maddylliieeee commented Dec 30, 2017

I found it here: lib/private/legacy/image.php

But is that still being used?

@stale
Copy link

stale bot commented Sep 20, 2021

This issue has been automatically closed.

@stale stale bot closed this as completed Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.