Thank you for your donation!


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


Idea: Thumbnail Image Quality
#31
Interesting :-)

Maybe we just leave the moOde defaults in place...

I don't see how its possible to figure out all these user configs .
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#32
In the case of an RPi that is controlled by both a PC and an iPad, you would want to have the higher resolution thumbnails. The way things are now, you would get different results if you generate the thumbnails from a PC vs an iPad. It would be best if you could control that with a customization option. 

If you were only ever going to control the RPi with a PC or lower capability device, you would want to generate smaller thumbnails. I think it depends on how you are going to be controlling the RPi and not which device you happen to choose to generate the thumbnails. 

Cheers, Bryce.
Reply
#33
One option would be to change the Hi-res thumbnails setting from Yes/No to something like below.

Auto - Device pixel ratio is used to determine optimum size and quality when thumbnails are generated
100 px (default)
200 px
300 px
400 px

The fixed sizes would all use a quality factor of 75.

What do you think?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#34
This was actually trivial to implement and works really well. Look for it in upcoming moOde 4.4 :-)

         
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#35
(11-08-2018, 02:55 PM)Tim Curtis Wrote: One option would be to change the Hi-res thumbnails setting from Yes/No to something like below.

Auto - Device pixel ratio is used to determine optimum size and quality when thumbnails are generated
100 px (default)
200 px
300 px
400 px

The fixed sizes would all use a quality factor of 75.

What do you think?

I think 50 IQ is probably better for > 100x100 and saves quite a bit on file size. IIRC I tested as low as 30 IQ when comparing 200x200 to 100x100/75 (so they were the same approx file size) and didn’t notice any horrible artifacting. I don’t have any 1:1 displays so can’t say that it’s always the case but bigger thumbs at lower IQ always looked better than lower res with higher IQ to me.

The dialog looks good though. Smile
Reply
#36
(11-08-2018, 02:55 PM)Tim Curtis Wrote: One option would be to change the Hi-res thumbnails setting from Yes/No to something like below.

Auto - Device pixel ratio is used to determine optimum size and quality when thumbnails are generated
100 px (default)
200 px
300 px
400 px

The fixed sizes would all use a quality factor of 75.

What do you think?
This sounds great.

How does swizzle not have a 1:1 device? ;-)

I found that I could selectively generate the size I wanted by selecting which device I used. PC / Gen 1 iPad Mini for 100 px, Gen 4 iPad for 200 px and my iPhone for 400 px. Your solution is much, much more logical.

Cheers, Bryce.
Reply
#37
Hi @BryceJ,

Try a test where for pixel ratio = 1 the settings below are used.

$thm_w = 400;
$thm_q = 50;

Then see how the images look on your 23" display.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#38
Hi Tim, 

I compared several thumbnails, all generated from 1000 px album images. There are differences between some of the images, others there is no noticeable differences. I did not find an instance where there was something that could be read on one thumbnail and not on the other. There were a few instances where thumbnails seemed sharper, but the differences were very small. 

On my favourite album cover Wave, the giraffe was different between the two thumbnails and the $thm_q = 50 thumbnail picked up a small artifact. However, neither of these could be seen on the 23" screen. I copied the images into Photoshop and looked at them carefully. It looks to me like the file sized difference between the two images was 10.5K for the q=50 image and 14.3K for the q=75 image.

I would say that there is virtually no visible difference between the two images an my 23" displays.

Cheers, Bryce.
Reply
#39
Great, thanks for testing. We will continue to optimize on our end :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#40
(11-03-2018, 07:47 PM)Tim Curtis Wrote: 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
Hi Tim

With Moode 6.3 I experienced same issue of bad quality album arts. I have found this thread and I have found a particularity which might help.

I have all square images as album arts. I have found that caches would always be generated as 100x100pxs. In this case I suspected that $pixel_ratio == 1 and it would go to the else branch. Not shure what pixel ratio it is because I did no echo it but after modifing the $thm_w from 100 to 200 the problem has been solved. So for shure that is the if/else branch that's going throug. If everything is right and there would be no other cases where it would create a bug, maybe this change should be made in an future update.

Thanks.
Reply


Forum Jump: