]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 20 Sep 2013 13:36:06 +0000 (13:36 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 20 Sep 2013 13:36:06 +0000 (13:36 +0000)
inc/commons/class.common.tools.php

index 8380f5c8d2f05aaaa0c6c39ec777504dc005b49c..dfc8ed773bb99d1657ddd4f8f46a1cfe1d060879 100644 (file)
@@ -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');