From 6ee5edbc0f5bb6215f9653382491e941f1d05b56 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 20 Sep 2013 13:36:06 +0000 Subject: [PATCH] --- inc/commons/class.common.tools.php | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/inc/commons/class.common.tools.php b/inc/commons/class.common.tools.php index 8380f5c8d..dfc8ed773 100644 --- a/inc/commons/class.common.tools.php +++ b/inc/commons/class.common.tools.php @@ -434,20 +434,13 @@ class commonTools { if (!isset($_POST['round']) || $_POST['round'] == 0) { $round = $upload; } else { - $w = $dim[0]; - $ra = round($w * ($_POST['round'] / 100)); $round = $tmp . '/round.png'; - $im = new cubeCommandLine('convert'); - $im->setPath(CONVERTER_PATH); - $im->setArg(null, $upload); - $c = '\( +clone -alpha extract '; - $c.='-draw \'fill black polygon 0,0 0,' . $ra . ' ' . $ra . ',0 fill white circle ' . $ra . ',' . $ra . ' ' . $ra . ',0\' '; - $c.='\( +clone -flip \) -compose Multiply -composite '; - $c.='\( +clone -flop \) -compose Multiply -composite '; - $c.='\) -alpha off -compose CopyOpacity -composite '; - $im->setManualArg($c); - $im->setArg(null, $round); - $im->execute(); + + $conv = new CubeIT_CommandLine_Imagemagick_Round(); + $conv->setSrc($upload); + $conv->setDest($round); + $conv->setRadius($_POST['round']); + $conv->execute(); } $png2icns = new cubeCommandLine('png2icns'); -- 2.39.5