From db76fa01f76a5fa55c431ed6eebca3330c4d94fa Mon Sep 17 00:00:00 2001 From: james Date: Tue, 14 Apr 2009 17:11:48 +0000 Subject: [PATCH] Use -resize instead of -sample - gives MUCH nicer image resizing --- config/images.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/images.php b/config/images.php index 669d38c1..a1c06be7 100644 --- a/config/images.php +++ b/config/images.php @@ -40,9 +40,9 @@ if($_POST['action']=="addimage") { echo notice(i18n("Creating sized logo files:
 logo-100.gif
 logo-200.gif
 logo-500.gif
 logo.gif")); //Make the gif's - system("convert -sample 100 \"".$_FILES['image']['tmp_name']."\" ../data/logo-100.gif"); - system("convert -sample 200 \"".$_FILES['image']['tmp_name']."\" ../data/logo-200.gif"); - system("convert -sample 500 \"".$_FILES['image']['tmp_name']."\" ../data/logo-500.gif"); + system("convert -resize 100 \"".$_FILES['image']['tmp_name']."\" ../data/logo-100.gif"); + system("convert -resize 200 \"".$_FILES['image']['tmp_name']."\" ../data/logo-200.gif"); + system("convert -resize 500 \"".$_FILES['image']['tmp_name']."\" ../data/logo-500.gif"); system("convert \"".$_FILES['image']['tmp_name']."\" ../data/logo.gif"); if(file_exists("../data/logo-100.gif") && file_exists("../data/logo-200.gif") && file_exists("../data/logo-500.gif") && file_exists("../data/logo.gif")) @@ -52,9 +52,9 @@ if($_POST['action']=="addimage") echo notice(i18n("Creating sized logo files:
 logo-100.png
 logo-200.png
 logo-500.png
 logo.png")); //make some PNG's as well - system("convert -sample 100 \"".$_FILES['image']['tmp_name']."\" ../data/logo-100.png"); - system("convert -sample 200 \"".$_FILES['image']['tmp_name']."\" ../data/logo-200.png"); - system("convert -sample 500 \"".$_FILES['image']['tmp_name']."\" ../data/logo-500.png"); + system("convert -resize 100 \"".$_FILES['image']['tmp_name']."\" ../data/logo-100.png"); + system("convert -resize 200 \"".$_FILES['image']['tmp_name']."\" ../data/logo-200.png"); + system("convert -resize 500 \"".$_FILES['image']['tmp_name']."\" ../data/logo-500.png"); system("convert \"".$_FILES['image']['tmp_name']."\" ../data/logo.png"); if(file_exists("../data/logo-100.png") && file_exists("../data/logo-200.png") && file_exists("../data/logo-500.png") && file_exists("../data/logo.png"))