Moode Forum
[IDEA] Thumbnail Image Quality - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [IDEA] Thumbnail Image Quality (/showthread.php?tid=648)

Pages: 1 2 3 4 5


Thumbnail Image Quality - christopherr - 11-03-2018

The thumbnail image quality is a bit too low for my taste. Would it be possible to have an option to increase the quality/resolution of the thumbnails? On a hi-dpi display it looks like trash. I have attached a screen of what I am seeing.  

[attachment=303]

Thanks!


RE: Thumbnail Image Quality - Tim Curtis - 11-03-2018

Post the UI CUSTOMIZATIONS section of System info and I'll have a look.

Menu, Configure, System
Menu, System info

-Tim


RE: Thumbnail Image Quality - christopherr - 11-03-2018

(11-03-2018, 04:15 PM)Tim Curtis Wrote: Post the UI CUSTOMIZATIONS section of System info and I'll have a look.

Menu, Configure, System
Menu, System info

-Tim


Code:
Theme = Standard
Accent color = Alizarin
Alpha blend = 1.0
Adaptive background = Yes
Background image = No
Playback history = No
Extra metadata = Yes
Artist list order = Artist
Cover search pri = Embedded cover
Hi-res covers = Yes
Pixel ratio = 2
Cover backdrop = Yes
Cover blur = 20px
Cover scale = 1.25



RE: Thumbnail Image Quality - Tim Curtis - 11-03-2018

Hi,

If you know some Linux SSH try modifying the code block below for pixel ratio == 2 in the file /var/www/command/thmcache.php, then regenerate the thumbnail cache. If you find a combination of width and quality that improves your covers then post the settings.

$thm_w is the width of the thumbnail image
$thm_q is the jpeg quality factor which ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default is the default IJG quality value (about 75).

The approach used in thmcache.php for higher resolution thumbnails is to find an image size and quality setting that produces an acceptable image while minimizing file size. The need to minimize file size is present because populating the Album Cover panel is an I-O intensive operation. Smaller files = faster performance.

Code:
if ($pixel_ratio == 2 && $hires_thm == 'Yes') {
    $thm_w = 200;
    $thm_q = 75;
}
elseif ($pixel_ratio >= 3 && $hires_thm == 'Yes') {
    $thm_w = 400;
    $thm_q = 50;
}
else {
    $thm_w = 100;
    $thm_q = 75;
}

-Tim


RE: Thumbnail Image Quality - christopherr - 11-04-2018

Thanks for the suggestion Tim. I have adjusted the width, but selecting re-gen album thumbnail cache from the Music Source Config page does not seem to change anything. Is this the correct way to regenerate the thumbnails?

- Edit: It is hard to distinguish between my reply and replied to comment. I'll stop clicking that button :/"


RE: Thumbnail Image Quality - Tim Curtis - 11-04-2018

Yes it is. It deletes all the thumbnail images in the cache directory then repopulates it.  You may have to clear the Browser cache AND history on your client in order to see the updated images.

Some other things that might be helpful for debugging.

1. Verify that new thumbnails have been generated by looking at the date and file sizes for the jpg's.

ls -l /var/local/www/imagesw/thmcache

2. Manually delete the thumbnail images and force the Album Cover panel to display default images, then re-gen the thumbnails

a) sudo rm -f /var/local/www/imagesw/thmcache/*
b) Refresh the Browser
c) Open the Album Cover panel and scroll down until all the albums covers are populated with the default moOde cover
d) Open the Sources screen and Re-Gen the thumbnail cache
e) repeat b) and c) except that the covers displayed should be the newly generated album cover thumbnails

-Tim


RE: Thumbnail Image Quality - christopherr - 11-04-2018

(11-04-2018, 02:08 AM)Tim Curtis Wrote: Yes it is. It deletes all the thumbnail images in the cache directory then repopulates it.  You may have to clear the Browser cache AND history on your client in order to see the updated images.

Some other things that might be helpful for debugging.

1. Verify that new thumbnails have been generated by looking at the date and file sizes for the jpg's.

ls -l /var/local/www/imagesw/thmcache

2. Manually delete the thumbnail images and force the Album Cover panel to display default images, then re-gen the thumbnails

a) sudo rm -f /var/local/www/imagesw/thmcache/*
b) Refresh the Browser
c) Open the Album Cover panel and scroll down until all the albums covers are populated with the default moOde cover
d) Open the Sources screen and Re-Gen the thumbnail cache
e) repeat b) and c) except that the covers displayed should be the newly generated album cover thumbnails

-Tim

It the re-gen button does not work for me. I had to sudo rm to remove the thumbnails.  After re-generating with the same settings as before, the thumbnails look much better. Is there any logs you can look at to see why re-gen was unable to remove the thumbnails?


RE: Thumbnail Image Quality - Tim Curtis - 11-04-2018

Just use #1 in my previous post and check the date (time stamp) in the directory listing before and after running a re-gen. If the timestamps are newer after re-gen then it would confirm that the images were newly created.

If the new images don't appear in Browser then clear Browser cache and history. If you don't clear cache/history the images may remain in the Browser cache until the Browser expires them after some period of time...


RE: Thumbnail Image Quality - christopherr - 11-04-2018

(11-04-2018, 03:20 AM)Tim Curtis Wrote: Just use #1 in my previous post and check the date (time stamp) in the directory listing before and after running a re-gen. If the timestamps are newer after re-gen then it would confirm that the images were newly created.

If the new images don't appear in Browser then clear Browser cache and history. If you don't clear cache/history the images may remain in the Browser cache until the Browser expires them after some period of time...

The time stamps are not newer.


RE: Thumbnail Image Quality - Tim Curtis - 11-04-2018

That symptom suggests thmcache.php might have crashed. Look for start and end messages in /var/log/moode.log. Their presence or absence would indicate whether there was a crash or not.

You would see something like below

Code:
20181104 115559 worker: Job regenthmcache
20181104 115559 thmcache: Start
20181104 115609 thmcache: Done: 62 album dirs processed

Post the modifications you made to thmcache,php and I'll have a look.