Solved New cache option with no degraded image quality
#1
Currently tmm offers two image cache options: smooth & fast. But even with smooth, the cached image quality is pretty lower.
To see the exact same image quality as the original, the user has to disable the image cache option. But then it doesn't show any pictures with data sources disconnected.

So would it be possible to add a new cache option that doesn't lower image quality at all?
Of course, the user must accept its adverse effects on the performance side (longer cache loading/building time, etc).
But that would still be better than seeing no pictures at all with data sources disconnected for users who's willing to see better image quality in sacrifice of performance.
#2
And about the resolution of cached images, how about making them in the possible maximum picture size of the Details panel on the right?
On 1920 x 1080 display, poster would be about 382 x 572 and fanart 382 x 214. That size of no degraded image cache would make the user feel the same as seeing the original pictures regardless of the picture size configured by panel layout.
And of course, it would be a lot faster than accessing the (sometimes huge) original pictures residing in various data sources, not to mention that they can show up with those sources disconnected.
#3
(2020-07-15, 04:56)tars Wrote: And about the resolution of cached images, how about making them in the possible maximum picture size of the Details panel on the right?
On 1920 x 1080 display, poster would be about 382 x 572 and fanart 382 x 214. That size of no degraded image cache would make the user feel the same as seeing the original pictures regardless of the picture size configured by panel layout.
And of course, it would be a lot faster than accessing the (sometimes huge) original pictures residing in various data sources, not to mention that they can show up with those sources disconnected.

I second this, I noticed right away, the image was blurry, even though the original is high res. When disabling cache like you said it removes image when source isn't connected.

Also, I selected to have artwork saved in an external folder, It wasn't doing this and putting it in the same folder as the movie though. Is this not possible? Am I misunderstanding this setting?
#4
the big problem in the picture cache is: _how_ should we improve the caching?

at the moment we have two options here:
1) reduce the resolution
2) re-encode the image

as you said in the second post, we already try to lower the resolution to save disk storage (we already have an user which has a image cache of over 20GB!) - but as you may notice, there is nothing like a "maximum" size of the panel; if you resize the tmm panel into different sizes, the image scales according to the rest of the tmm window.. may I ask you if you have screen scaling activated? (2k/4k display with a screen scaling > 100%?). I noticed some ugly scaling when Windows is set to scale the UI - we've reworked the whole image drawing algorithm for v4 to address this issue

the caching parameters just indicate how _good_ we should try to scale them (only a parameter how fast the algorithm for scaling works) and this results to much more artifacts if you choose FAST.. But as this should only being processed once per image (path) I'd suggest you to use best...
I may add an option to use ORIGINAL - only to put the original file into the cache, but be aware -> your cache folder may explode Big Grin
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#5
(2020-07-29, 12:31)mlaggner Wrote: I may add an option to use ORIGINAL - only to put the original file into the cache, but be aware -> your cache folder may explode Big Grin

Then how about adding an option of a custom width for cached images?
In my case I am using 1920 x 1080 display with 100% scaling. I'd just put 382 for the width, then all cached images will look the same as the original (I'm referring to the poster/fanart images on Details tab on the right).
Users with a different display resolution & scaling may have different preferred width, and some users with a huge number of images shouldn't choose this option.
#6
Thanks a lot for implementing this (v4 nightly)!
With FHD display, I'm using BIG and Quality setting and quite satisfied with the result.
But one thing I don't like is how it handles images smaller than 1000px long side.
When I first read the descriptions of "BIG" option "Scale images to a resolution of 1000px long side", I thought it would only scale down images bigger than 1000px long side and use original size for the rest of smaller images. 
But that's not what it's doing. Looks like it currently creates a two-thirds scaled down image with maximum 1000px long side for every image.
As a result small images don't look good since every image is scaled down in cache, and it's kinda defeating the purpose of providing better image quality with these new cache options.
How about using the original size (converting to JPG will be still useful for big PNGs) without scaling it down if the image's long side is smaller than 1000px with BIG option (and 400px with SMALL option), or providing such an option?
#7
(2020-09-23, 15:19)tars Wrote: When I first read the descriptions of "BIG" option "Scale images to a resolution of 1000px long side", I thought it would only scale down images bigger than 1000px long side and use original size for the rest of smaller images. 
But that's not what it's doing. Looks like it currently creates a two-thirds scaled down image with maximum 1000px long side for every image.
As a result small images don't look good since every image is scaled down in cache, and it's kinda defeating the purpose of providing better image quality with these new cache options.
How about using the original size (converting to JPG will be still useful for big PNGs) without scaling it down if the image's long side is smaller than 1000px with BIG option (and 400px with SMALL option), or providing such an option?

well, I do not think I get your right here..

the logic did not change between v3 and v4, just the "break points" where to scale:
- if the image is BIGGER (on the long side) as 1000px/400px it gets scaled down to 1000px/400px. No upscaling is being done.

or are you speaking of the canvas where tmm paints the image in the UI?
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#8
I know no upscaling is being done and have no complaints about scaling big images down to maximum 1000px long side.
What I'm referring to is how it handles smaller images.

For 509x755 poster, it builds 339x503 cache image which is actually smaller than the maximum picture size (382x572) of the Details panel on FHD display.
Why not just use the original size (509x755) for cache without scaling down when long side (755) is smaller than 1000px?
For 1280x720 fanart image, it creates 853x480 cache image. Why not scale it down only to 1000x563 instead since 1000px is maximum long side?

Of course downloading a big image in the first place would be one solution, but many old, non-US movies don't have big posters available. I'd like tmm to show those small images as sharp as possible without further scaling down.
#9
you are right - there was some ancient code left behind. This will be fixed in the next build
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#10
Thanks for the fix! Works great now.

It really changed the look of the program, when cache is enabled, with crisp and sharp images replacing blurry and dull images.

Logout Mark Read Team Forum Stats Members Help
New cache option with no degraded image quality0