From b5cb88aa92eb4eaac06afebe5109b0beac8f5ea8 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Thu, 12 Jan 2012 03:04:02 +0100 Subject: delete the temporary png files earlier --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') 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); -- cgit v1.2.3