Browse Source

set image format to png

pull/7/head
ghost 3 years ago
parent
commit
e48d60ac1d
  1. 2
      library/icon.php
  2. 4
      public/image.php

2
library/icon.php

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

4
public/image.php

@ -5,11 +5,11 @@ require_once('../library/icon.php'); @@ -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)) {

Loading…
Cancel
Save