Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Idea: Thumbnail Image Quality
#21
Interesting regarding the thmcache directory. I've not been able to repro the issue and I'm not seeing anything obvious in the code, but of course bugs can never be ruled out.

The re-gen should first delete all the existing jpg's and then populate the directory with newly generated jpg's. These new files would have newer timestamps.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#22
Thanks for all your help. My device is a pi3B+ connected over wi-fi in case anyone else with a similar device is experiencing the same issue.
Reply
#23
Tim, how is the pixel ratio set? I have Hi-res thumbnails set to yes, but my pixel ratio is set to 1. So it looks like I would be getting the smallest thumbnails. I am using a 1920x1080 screen for my browser, if that matters.

Code:
     U I  C U S T O M I Z A T I O N S  

    Theme            = Standard
    Accent color        = River
    Alpha blend        = 0.65
    Adaptive background    = No
    Background image    = No
    Playback history    = No
    Extra metadata        = Yes
    Artist list order    = AlbumArtist
    Cover search pri    = Embedded cover
    Hi-res covers        = Yes
    Pixel ratio        = 1
    Cover backdrop        = Yes
    Cover blur        = 20px
    Cover scale        = 1.25
Reply
#24
A typical desktop display (like 1080p) uses a 1:1 pixel ratio, that is every pixel on the screen is represented by one actual pixel. With higher density pixel devices (phones, tablets, some computers) one pixel on the screen is part of a larger logical pixel. When Apple came out with the iPhone 4 they doubled the resolution but kept the same display profile (320x480 iirc) and used the 4x increase in pixels to improve the quality of the image as fonts and graphics could be rendered with more fidelity. That’s a 2:1 pixel ratio, some devices now are over 3:1. So the problem arises: what do you do with bitmap graphics, they don’t know about pixel ratios and will either be very small or need to be scaled up which renders them blurry. The solution is to make them larger, so instead of a 100x100 image you’d make it 200x200 (or larger depending on the pixel ratio).

So back to moode... creating thumbnails is a time consuming process and we can’t know every device you’ll want to use so the default size is 100x100 with iq of 75 which is good for something like the Pi touchscreen. A high-res version is 200x200 with lower iq (50 iirc) which is actually scaled down a bit to fit into the area that the thumbnail lives in (which isn’t a fixed size but a percentage of a value that changes based on the logical screen resolution) but scaling down isn’t bad like scaling up is. I didn’t look to see exactly how Tim implemented it but for devices with a pixel ratio > 1:1 it needs larger images to fit in the same size area so a 2:1 device needs a 200x200 image for it to look the same as a 100x100 image on a 1:1 display (it’ll be sharper but there are more pixels to use). The high-res option makes that 400x400 which isn’t exact for a device with >= 3:1 pixel ratio but there are diminishing returns and there’s a balance needed between fidelity and size - the whole point of the existence of thumbnails is we want the cover view to display the covers much more quickly than just loading up the existing cover art.
Reply
#25
Thanks for the information Swizzle. I found the 100x100 thumbnails a bit blurry on my 23" display. I regenerated them at a higher resolution and although the initial load was a bit slower, the album view tab scrolls very quickly now and the thumbnails look sharp.

I really like the album view!

Cheers, Bryce.
Reply
#26
Hi @BryceJ,

Did you do a little code hacking to get > 100x100 as the default for pixel_ratio = 1 :-)

Currently we are using the pixel ratio reported by the device and some static sizes. It might be possible to have a setting that would allow manually specifying a size and quality.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#27
Yes, you posted the code at the beginning of this thread and I just changed the pixel width for pixel_ratio = 1. The difference is dramatic!

An option would be a great idea. I only use my PC with this particular RPi so performance isn't an issue for me, but I can see it being an issue with some devices.

Cheers, Bryce.
Reply
#28
Nice. moOde offers plenty of opportunities for hacking :-)

What width did you chose?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#29
400.  Blush

Thinking about it, 200 makes more sense. Next time  Wink
Reply
#30
I re-generated the album thumbnails on another RPi at a width of 200 pixels. Since I am seeing 10 albums per line and my PC screen resolution is only 1920 that should look no different than using a width of 400 for the thumbnails as both thumbnails will have to be scaled down to fit on the page. 

The difference is small but it is noticeable. That really surprised me. While most of the thumbnails look about the same, some of the printing on the 400 pixel thumbnails is clearer than it is on the 200 pixel thumbnails. Overall the pages seems a little sharper. One very obvious difference was the album Wave by Antonio Carlos Jobim. This  cover has a giraffe running along the beach. The neck of the giraffe was a bit rough on the 200 pixel thumbnail, but not on the 400 pixel thumbnail. 

So while 200 if fine, 400 is just a little bit better on my PC.

On my Gen 4 iPad Mini, the difference is very noticeable as there are only 5 thumbnails per row. The thumbnails look perfect on the iPad.

Cheers, Bryce.
Reply


Forum Jump: