changeset 268:07b2b271c12a

Some fixes to GraphicsMagick image conversion.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 19 Dec 2018 12:41:10 +0200
parents 108b354ea2ea
children 371b9ee575b5
files mgtool.php
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mgtool.php	Wed Dec 19 12:40:38 2018 +0200
+++ b/mgtool.php	Wed Dec 19 12:41:10 2018 +0200
@@ -168,8 +168,8 @@
       if ($thumb || $dim["width"] != $outDim[0] || $dim["height"] != $outDim[1])
       {
         $img->resizeImage($outDim[0], $outDim[1], Gmagick::FILTER_LANCZOS, 1);
-        //$img->setImageExtent($outDim[0], $outDim[1]);
-        //$img->unsharpMaskImage(0, 0.5, 1, 0.05);
+        $img->cropImage($outDim[0], $outDim[1], 0, 0);
+        $img->unsharpMaskImage(0, 0.5, 1, 0.05);
       }
     }
 
@@ -198,7 +198,7 @@
 //      $img->profileImage("icc", $profiles);
 
     $img->writeImage($outFilename);
-    $img->removeImage();
+    $img->destroy();
   }
 
   return TRUE;