Consider turning on bilinear interpolation for the CG gallery thumbnails. #182
Labels
No Label
bug
Critical Priority
duplicate
enhancement
help wanted
High Priority
Low Priority
Medium Priority
Meta
needs more info
question
refactor
wontfix
bug
Critical Priority
duplicate
enhancement
help wanted
High Priority
invalid
Low Priority
Medium Priority
Meta
question
wontfix
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Cavemanon/SnootGame#182
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently the CG thumbnails are scaled down using nearest neighbor, this makes the thumbanail look blocky and way too sharp, consider using bilinear interpolation instead.
(Diferences are more noticable if you open the images in a new tab)
Currenlty:
Bilinear:
Since it's a very simple fix, give me the go-ahead and I'll make a PR for it.
Turned off due to performance (Ren'Py blows so hard on this department), turning it back on would cause a long stutter with tons of images unlocked.
Although could be solved with in engine or post texture atlas / sprite sheet, instead of grabbing the original images and scaling them down.
I don't think this is an egrigious performance difference, testing it myself gave me a very slightly longer delay in opening the menu. If anyone has a really big problem with it, ideally it's something that's toggleable, and that's pretty easy to implement into the options menu.
perhaps a cringe idea but could we parallelize the loading a bit?
Maybe within the screen language, not too sure. Worst case doing either the texture atlas or paralleization require rewriting the gallery to be a custom displayable.
I think you're overestimating how intensive bilinear filtering is, testing it on a full save file on my 5 year-old Chinese cellphone only resulted in a delay of 2-3 seconds when opening the gallery for the first time. It also made me realize that phone screens are so small that both bilinear filtering and nearest neighbor look almost the, so this should probably stay this way for the 'small' variant.
Either way, if it is that much of a concern you could always add the thumbnails to the game files or just generate them when the game is launched for the first time and save them in a cache folder.
The generated thumbnail option seems like it'd be the best since you wouldn't need to rescale constantly. You'd just need to import the imagemagick library and then convert them. Only issue would be perfectly scaling them so they don't look like some deepfried shitpost.
Not even, you can just use Ren'pys im.factorscale on the images and then save the result to a file on startup.
Though now that I think about it, doing it this way might be a problem for phones.
Anyway, since you agree with me that bilinear interpolation is the better option I'll begin testing things out. Will make a PR when I find an acceptable solution.
Consider turning on biliner interpolation for the CG gallery thumbnails.to Consider turning on bilinear interpolation for the CG gallery thumbnails.Would this be considered too hacky to implement? Renpy doesn't seem to have a way to get the raw data from a displayable so I had to resort to getting the surface object from the resulting scaling.
I mean, the code does work and it even works on android
I've seen worse in my life, just make sure that function has doc strings.
I'll let the others weigh in as well.
This has been fixed.