changeset 257:67a807666405

Minor fix to mgtool format conversion.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 12 Dec 2018 17:20:58 +0200
parents 6ad17bc3d1a6
children c5a5899f4869
files mgtool.php
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;