summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index 2cfbfdf..4fff92d 100644
--- a/index.php
+++ b/index.php
@@ -158,13 +158,13 @@ function extract_dominant_color($svg, $algo = 'average', $filter = 'grey')
return false;
}
$img = imagecreatefrompng($png);
+ unlink($png);
if (!$img) {
warn('Initial rasterization generated incorrect PNG');
return false;
}
$color = call_user_func('domcolor_'. $algo, $img, 'colfilter_'.$filter);
imagedestroy($img);
- unlink($png);
if (!$color) {
warn("I failed to get a dominant color. Your icon might be too greyish, so I'm making it grey.");
return array(128, 128, 128);