Thank you for your donation!


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


... some questions for dummies
#9
Yes, the thumbnails need to be regenerated when changing the resolution.

The Auto setting does the following, from the source code.

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];
}
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
... some questions for dummies - by Venerdi - 03-31-2022, 01:25 PM
RE: ... some questions for dummies - by Venerdi - 03-31-2022, 02:13 PM
RE: ... some questions for dummies - by Venerdi - 03-31-2022, 07:54 PM
RE: ... some questions for dummies - by Venerdi - 04-01-2022, 09:56 PM
RE: ... some questions for dummies - by Tim Curtis - 04-02-2022, 12:44 AM
RE: ... some questions for dummies - by Venerdi - 04-02-2022, 12:48 PM
RE: ... some questions for dummies - by Venerdi - 04-12-2022, 05:35 PM

Forum Jump: