diff mgtool.php @ 303:6bb434968623

Add new MG_STR_LC setting type, which is string but automatically lowercased.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 03 Apr 2020 16:22:51 +0300
parents b72da68991ed
children da150fe627b6
line wrap: on
line diff
--- a/mgtool.php	Thu Mar 26 11:39:30 2020 +0200
+++ b/mgtool.php	Fri Apr 03 16:22:51 2020 +0300
@@ -142,8 +142,7 @@
     }
 
     $img->setImageDepth(8);
-    $tfmt = strtolower($outFormat);
-    switch ($tfmt)
+    switch ($outFormat)
     {
       case "jpeg":
         $img->setFormat("JPEG");
@@ -156,7 +155,7 @@
         break;
 
        default:
-        return mgError("Unsupported MGallery med/tn format '".$tfmt."'.\n");
+        return mgError("Unsupported MGallery med/tn format '".$outFormat."'.\n");
     }
 
     $img->setImageCompressionQuality($outQuality);
@@ -218,8 +217,7 @@
     }
 
     $img->setImageDepth(8);
-    $tfmt = strtolower($outFormat);
-    switch ($tfmt)
+    switch ($outFormat)
     {
       case "jpeg":
         $img->setFormat("JPEG");
@@ -232,7 +230,7 @@
         break;
 
        default:
-        return mgError("Unsupported MGallery med/tn format '".$tfmt."'.\n");
+        return mgError("Unsupported MGallery med/tn format '".$outFormat."'.\n");
     }
 
     $img->setCompressionQuality($outQuality);