set image format to png

This commit is contained in:
ghost 2022-05-13 18:31:50 +03:00
parent 5de0a77ccc
commit e48d60ac1d
2 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ final class Icon {
}
ob_start();
imagejpeg($resized, null, 100);
imagepng($resized);
imagedestroy($resized);
return ob_get_clean();
}

View File

@ -5,11 +5,11 @@ require_once('../library/icon.php');
if (isset($_GET['hash'])) {
header("Content-Type: image/jpeg");
header("Content-Type: image/png");
if (CACHE_ENABLED) {
$filename = dirname(__FILE__) . '/../cache/' . $_GET['hash'] . '.jpeg';
$filename = dirname(__FILE__) . '/../cache/' . $_GET['hash'] . '.png';
if (!file_exists($filename)) {