summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-01-12 03:04:02 +0100
committerJavier S. Pedro <javier@pcjavier.(none)>2012-01-12 03:04:29 +0100
commitb5cb88aa92eb4eaac06afebe5109b0beac8f5ea8 (patch)
tree519cd92c71531b264d36ba9a5f24c4decb45926c
parentd014aa74f53959ebd490c6c20b83201b865cbafa (diff)
downloadhicg-b5cb88aa92eb4eaac06afebe5109b0beac8f5ea8.tar.gz
hicg-b5cb88aa92eb4eaac06afebe5109b0beac8f5ea8.zip
delete the temporary png files earlier
-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);