From: Mischa POSLAWSKY Date: Sun, 27 Dec 2020 02:58:32 +0000 (+0100) Subject: thumb: only shrink larger images X-Git-Tag: v5.1~19 X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/4486f69521f03fe56549394f13f7c529f57fa962 thumb: only shrink larger images Support smaller user uploads unscaled (with smaller file sizes), expecting browser upscaling if necessary (lower quality should not be a problem). --- diff --git a/thumb/index.php b/thumb/index.php index 7de4f45..bd08d88 100644 --- a/thumb/index.php +++ b/thumb/index.php @@ -99,7 +99,7 @@ function mkthumb_exec($source, $target, $width, $height) '-interlace', 'plane', # progressive '-strip', '-taint', # omit metadata '-sampling-factor', '4:2:0', '-colorspace', 'sRGB', # half chroma - '-resize', "${width}x${height}", + '-resize', "${width}x${height}>", '-quality', '85%', $source, "jpg:$target" ]));