diff mgallery.inc.php @ 250:3af3b3f50cb0

Add settings for med_format and tn_format (currently allowed values are "jpeg" and "webp") to specify the med/tn image formats. The default is JPEG.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 08 Dec 2018 15:51:02 +0200
parents 474d88b8188b
children c95fdce46842
line wrap: on
line diff
--- a/mgallery.inc.php	Mon Oct 29 20:32:59 2018 +0200
+++ b/mgallery.inc.php	Sat Dec 08 15:51:02 2018 +0200
@@ -61,7 +61,7 @@
   "base_url"         => [MG_STR, mgPathName($_SERVER["PHP_SELF"])],
   "image_url"        => [MG_STR, mgPathName($_SERVER["PHP_SELF"])],
   "mgallery_php"     => [MG_STR, "mgallery.php"],
-  "format_exts"      => [MG_STR, "\.jpg|\.png|\.gif|\.jpeg"],
+  "format_exts"      => [MG_STR, "\.jpg|\.png|\.gif|\.jpeg|\.webp"],
   "captions_file"    => [MG_STR, "captions.txt"],
   "header_file"      => [MG_STR, "header.txt"],
   "info_file"        => [MG_STR, "gallery.info"],
@@ -85,10 +85,12 @@
   "tn_path"          => [MG_STR, "tn/"],
   "med_path"         => [MG_STR, "med/"],
 
+  "tn_format"        => [MG_STR, "jpeg"],
   "tn_width"         => [MG_INT, 140],  // In pixels, applies as bounding box for w/h
   "tn_height"        => [MG_INT, 100],
   "tn_quality"       => [MG_INT, 85],   // JPEG quality percent
 
+  "med_format"       => [MG_STR, "jpeg"],
   "med_width"        => [MG_INT, 960],
   "med_height"       => [MG_INT, 640],
   "med_quality"      => [MG_INT, 90],