git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1e16f0
)
thumb: only shrink larger images
author
Mischa POSLAWSKY
<perl@shiar.org>
Sun, 27 Dec 2020 02:58:32 +0000
(
03:58
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 30 Dec 2020 23:22:16 +0000
(
00:22
+0100)
Support smaller user uploads unscaled (with smaller file sizes), expecting
browser upscaling if necessary (lower quality should not be a problem).
thumb/index.php
patch
|
blob
|
history
diff --git
a/thumb/index.php
b/thumb/index.php
index 7de4f456939152bd931f61a15094b4a061ebbe08..bd08d8841497d266a1b573d172431f96981e2b0c 100644
(file)
--- 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"
]));