# HG changeset patch # User Matti Hamalainen # Date 1545216070 -7200 # Node ID 07b2b271c12a6037615a9be5ab6c4ad8bafd1f14 # Parent 108b354ea2ea06219742d92fb47ae708e9489cc1 Some fixes to GraphicsMagick image conversion. diff -r 108b354ea2ea -r 07b2b271c12a mgtool.php --- 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;