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:
eef5016
)
thumb: jpeg encoding regardless of original
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 23 Aug 2018 18:45:46 +0000
(20:45 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 25 Aug 2018 23:34:16 +0000
(
01:34
+0200)
Disregard original file format after resizing, as it keeps lossless [png]
compression [size] and inconsistent results.
Unaltered request extension may not match, but should mostly display
correctly as browsers should prefer the correct content-type instead.
thumb/index.php
patch
|
blob
|
history
diff --git
a/thumb/index.php
b/thumb/index.php
index 2a8e30303f7abf9482dca27e6f57e5cf9110aa5d..24f46ccb97ab44ea5125c48d63dc18a03283d4bd 100644
(file)
--- a/
thumb/index.php
+++ b/
thumb/index.php
@@
-91,7
+91,7
@@
function mkthumb_exec($source, $target, $width, $height)
'-trim',
'-resize', "${width}x${height}",
'-quality', '90%',
- $source,
$target
+ $source,
"jpg:$target"
]));
$return = shell_exec("$cmd 2>&1");
if ($return) {