# HG changeset patch # User Matti Hamalainen # Date 1544628058 -7200 # Node ID 67a80766640526ae5c396ad9ff1ac1b7a5661489 # Parent 6ad17bc3d1a65f9c4be550e3004bc58bbdfef698 Minor fix to mgtool format conversion. diff -r 6ad17bc3d1a6 -r 67a807666405 mgtool.php --- a/mgtool.php Wed Dec 12 15:11:41 2018 +0200 +++ b/mgtool.php Wed Dec 12 17:20:58 2018 +0200 @@ -110,7 +110,8 @@ } $img->setImageDepth(8); - switch (strtolower($outFormat)) + $tfmt = strtolower($outFormat); + switch ($tfmt) { case "jpeg": $img->setFormat("JPEG"); @@ -118,7 +119,7 @@ break; case "webp": - $img->setFormat("webp"); + $img->setFormat("WEBP"); $img->setOption('webp:method', '6'); break;