]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
added some comments to help people who look at convert command line
authorCash Costello <cash.costello@gmail.com>
Mon, 22 Feb 2010 00:39:14 +0000 (00:39 +0000)
committerCash Costello <cash.costello@gmail.com>
Mon, 22 Feb 2010 00:39:14 +0000 (00:39 +0000)
lib/resize.php

index c35eb09eaa6353b48b540ea4480e0551bf8df58f..250511d660b9a3ec880273d3c38149dcaead2ee8 100644 (file)
                                        $im_path = "/usr/bin/";
                                }
                                if(substr($im_path, strlen($im_path)-1, 1) != "/") $im_path .= "/";
+                               // see imagemagick web site for explanation of these parameters
+                               // the ^ in the resize means those are minimum width and height values
                                $command = $im_path . "convert \"$input_name\" -resize ".$newwidth."x".$newheight."^ -gravity center -extent ".$newwidth."x".$newheight." \"$output_name\"";
                                exec($command);
                                return true;
                return false;
        }
 
-?>
\ No newline at end of file
+?>