Bug fix
This commit is contained in:
parent
37c1d68816
commit
25ffbb3766
@ -22,10 +22,13 @@ if (!is_file($preview_path)) {
|
|||||||
$image->setBackgroundColor(new ImagickPixel('#ffffff'));
|
$image->setBackgroundColor(new ImagickPixel('#ffffff'));
|
||||||
$image->readImageBlob(file_get_contents($icon_path));
|
$image->readImageBlob(file_get_contents($icon_path));
|
||||||
$image->setImageFormat("png24");
|
$image->setImageFormat("png24");
|
||||||
$image->setImageInterpolateMethod('Integer');
|
$image->setImageInterpolateMethod(Imagick::INTERPOLATE_INTEGER);
|
||||||
$image->resizeImage(180, 180, Imagick::FILTER_POINT, 1);
|
$image->resizeImage(180, 180, Imagick::FILTER_POINT, 1);
|
||||||
$image->borderImage('#ffffff', 510, 225);
|
$image->borderImage('#ffffff', 510, 225);
|
||||||
$image->writeImage($preview_path);
|
$image->writeImage($preview_path);
|
||||||
|
$preview_mtime = time();
|
||||||
|
} else {
|
||||||
|
$preview_mtime = filemtime($preview_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate color palette
|
// generate color palette
|
||||||
@ -47,7 +50,7 @@ $tags = $icon_json[$icon_name . ".svg"];
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta property="og:title" content="<?= $icon_name ?> - Pixel Icons" />
|
<meta property="og:title" content="<?= $icon_name ?> - Pixel Icons" />
|
||||||
<meta property="og:url" content="https://sqkhor.com/pixel-icons/<?= $icon_name ?>" />
|
<meta property="og:url" content="https://sqkhor.com/pixel-icons/<?= $icon_name ?>" />
|
||||||
<meta property="og:image" content="https://sqkhor.com/pixel-icons/preview/<?= $icon_name ?>.png" />
|
<meta property="og:image" content="https://sqkhor.com/pixel-icons/preview/<?= $icon_name ?>.png?<?= $preview_mtime ?>" />
|
||||||
<meta property="og:description" content="This is a set of over 200 SVG icons made with a 9x9 pixel grid. Feel free to use them as you please." />
|
<meta property="og:description" content="This is a set of over 200 SVG icons made with a 9x9 pixel grid. Feel free to use them as you please." />
|
||||||
<title><?= $icon_name ?> - Pixel Icons</title>
|
<title><?= $icon_name ?> - Pixel Icons</title>
|
||||||
<meta name="description" content="This is a set of over 200 SVG icons made with a 9x9 pixel grid. Feel free to use them as you please." />
|
<meta name="description" content="This is a set of over 200 SVG icons made with a 9x9 pixel grid. Feel free to use them as you please." />
|
||||||
|
Loading…
Reference in New Issue
Block a user