03-21-2021, 12:43 PM
(03-21-2021, 09:18 AM)chano22000 Wrote: Thumbnails resolution
Hi Tim,
Thank you for your answer.
Quote:Q1 : is it possible to restore the lower resolutions (including 200px) ?
A: I'm not sure I understand whats causing your performance issue. Any modern Laptop should easily and quickly render 400px images. My old iPad mini has no problem quickly rendering 600px cover images. Safari Browser.
400px thumbnails (the minimal enforceable resolution) are obviously overkill for a full HD screen displaying the standard album view (6 columns + spacing), but we can live with it since they are cached by the browser. I personnaly sticked to the info related to this item in 6.7.1 advising not to use unnecessary high resolutions.
You might have a look on the "auto" mode which as previously mentionned does not deliver any kind of optimal resolution (100px instead of 200 in present case for the browser to downscale to 180 in full screen mode), but I suspect there are other priorities !
Thank you again for Moode and your attention.
Philippe
The Auto setting uses the device's pixel ratio to determine the optimal image size and quality.
https://stackoverflow.com/questions/8785...ixel-ratio
The logic moOde uses is in /var/www/command/thmcache.php. improvements are always welcome.
Code:
// Auto: Uses the device Pixel Ratio to set an optimum resolution and quality while maintaining the smallest file size (fastest image load time).
// NOTE: Manual should be used for Desktops
/*
Device Physical Pixel Logical
Res (px) Ratio Res (px)
---------------------------------------------------
iPhone 3g 320×480 1 320×480
iPhone 4s 640×960 2 320×480
iPhone 5 640×1136 2 320×568
iPhone 6 750×1334 2 375×667
iPad 2 768×1024 1 768×1024
iPad 3 1536×2048 2 768×1024
Samsung GS3 720×1280 2 360×640
Samsung GS4 1080×1920 3 360×640
iMac 27" 2560x1440 1 2560x1440
iMac 27" R 5120x2880 2 2560x1440
*/
if ($hires_thm == 'Auto') {
if ($pixel_ratio == 2) {
$thm_w = 200;
$thm_q = 75;
}
elseif ($pixel_ratio >= 3) {
$thm_w = 400;
$thm_q = 50;
}
else {
$thm_w = 100;
$thm_q = 75;
}
}
// Manual: Use the specified resolution and quality factor.
else {
$hires_thm_wq = explode(',', $hires_thm);
$thm_w = substr($hires_thm_wq[0], 0, 3); // The numeric part ex: "400" from "400px"
$thm_q = $hires_thm_wq[1];
}
The pixel ratio and other related items are reported in the Moode startup log after thumbnails have been generated.