Posts: 13,396
Threads: 304
Joined: Mar 2018
Reputation:
543
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.
Posts: 39
Threads: 7
Joined: Aug 2018
Reputation:
0
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.
Posts: 703
Threads: 6
Joined: Apr 2018
Reputation:
11
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.
Posts: 117
Threads: 6
Joined: Apr 2018
Reputation:
0
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.
Posts: 117
Threads: 6
Joined: Apr 2018
Reputation:
0
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.
Posts: 13,396
Threads: 304
Joined: Mar 2018
Reputation:
543
Nice. moOde offers plenty of opportunities for hacking :-)
What width did you chose?
Posts: 117
Threads: 6
Joined: Apr 2018
Reputation:
0
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.