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

Change thumbnail default size and resize algorithm #336

Merged
merged 4 commits into from
Jan 31, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jan 28, 2020

Change thumbnail generation algorithm to 'Box' rather than NearestNeighbor, and change the default size from 100px to 200px.

Also added a size parameter to url query to allow for variable quality in galleries.

Box is about 25% slower than Nearest Neighbor by my measurements, but the quality is well worth it. A future enhancement might be to make the generation algo a user setting, since some users might prefer Lanczos or similar that offers sharper results.

Also, please excuse the format diff noise.

@bnkai bnkai added feature Pull requests that add a new feature improvement Something needed tweaking. and removed feature Pull requests that add a new feature labels Jan 28, 2020
@ghost ghost changed the title Change thumbnail resize algorithm and add size parameter Change thumbnail default size and resize algorithm Jan 28, 2020
pkg/api/routes_gallery.go Outdated Show resolved Hide resolved
pkg/api/routes_gallery.go Outdated Show resolved Hide resolved
@bnkai
Copy link
Collaborator

bnkai commented Jan 29, 2020

Tests ok, two possible cosmetic typos.
Should be enough to close #303.

@WithoutPants WithoutPants mentioned this pull request Jan 30, 2020
10 tasks
@Leopere Leopere merged commit 6a6e8d8 into stashapp:develop Jan 31, 2020
Tweeticoats pushed a commit to Tweeticoats/stash that referenced this pull request Feb 1, 2021
* Change thumbnail resize algorithm and add size parameter

* Height -> Width

* Change default size from 100px to 200px

* Height -> width
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something needed tweaking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants