comparison 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
comparison
equal deleted inserted replaced
249:abcd21b01829 250:3af3b3f50cb0
59 "clean_urls" => [MG_BOOL, FALSE], 59 "clean_urls" => [MG_BOOL, FALSE],
60 "base_path" => [MG_STR, mgPathName(mgRealPath($_SERVER["SCRIPT_FILENAME"]))], 60 "base_path" => [MG_STR, mgPathName(mgRealPath($_SERVER["SCRIPT_FILENAME"]))],
61 "base_url" => [MG_STR, mgPathName($_SERVER["PHP_SELF"])], 61 "base_url" => [MG_STR, mgPathName($_SERVER["PHP_SELF"])],
62 "image_url" => [MG_STR, mgPathName($_SERVER["PHP_SELF"])], 62 "image_url" => [MG_STR, mgPathName($_SERVER["PHP_SELF"])],
63 "mgallery_php" => [MG_STR, "mgallery.php"], 63 "mgallery_php" => [MG_STR, "mgallery.php"],
64 "format_exts" => [MG_STR, "\.jpg|\.png|\.gif|\.jpeg"], 64 "format_exts" => [MG_STR, "\.jpg|\.png|\.gif|\.jpeg|\.webp"],
65 "captions_file" => [MG_STR, "captions.txt"], 65 "captions_file" => [MG_STR, "captions.txt"],
66 "header_file" => [MG_STR, "header.txt"], 66 "header_file" => [MG_STR, "header.txt"],
67 "info_file" => [MG_STR, "gallery.info"], 67 "info_file" => [MG_STR, "gallery.info"],
68 "cache_file" => [MG_STR, ".mgallery.cache"], 68 "cache_file" => [MG_STR, ".mgallery.cache"],
69 69
83 "album_flags" => [MG_FLAGS, MGF_JAVASCRIPT | MGF_BREADCRUMBS, &$mgGFlags], 83 "album_flags" => [MG_FLAGS, MGF_JAVASCRIPT | MGF_BREADCRUMBS, &$mgGFlags],
84 84
85 "tn_path" => [MG_STR, "tn/"], 85 "tn_path" => [MG_STR, "tn/"],
86 "med_path" => [MG_STR, "med/"], 86 "med_path" => [MG_STR, "med/"],
87 87
88 "tn_format" => [MG_STR, "jpeg"],
88 "tn_width" => [MG_INT, 140], // In pixels, applies as bounding box for w/h 89 "tn_width" => [MG_INT, 140], // In pixels, applies as bounding box for w/h
89 "tn_height" => [MG_INT, 100], 90 "tn_height" => [MG_INT, 100],
90 "tn_quality" => [MG_INT, 85], // JPEG quality percent 91 "tn_quality" => [MG_INT, 85], // JPEG quality percent
91 92
93 "med_format" => [MG_STR, "jpeg"],
92 "med_width" => [MG_INT, 960], 94 "med_width" => [MG_INT, 960],
93 "med_height" => [MG_INT, 640], 95 "med_height" => [MG_INT, 640],
94 "med_quality" => [MG_INT, 90], 96 "med_quality" => [MG_INT, 90],
95 97
96 "debug" => [MG_BOOL, FALSE], 98 "debug" => [MG_BOOL, FALSE],