git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sitemap.xml: calculate priority from path names
[minimedit.git]
/
thumb
/
index.php
diff --git
a/thumb/index.php
b/thumb/index.php
index 27a194ee51584f5840c42eff880207e02e6a42da..b4f6091f5005ec405e433504ebb1f98d098cbb36 100644
(file)
--- a/
thumb/index.php
+++ b/
thumb/index.php
@@
-28,6
+28,7
@@
catch (Throwable $e) {
exit;
}
exit;
}
+header('Cache-Control: max-age=2628000');
header('Content-type: '.mime_content_type($target));
readfile($target);
exit;
header('Content-type: '.mime_content_type($target));
readfile($target);
exit;
@@
-89,6
+90,7
@@
function mkthumb_exec($source, $target, $width, $height)
$cmd = implode(' ', array_map('escapeshellarg', [
'convert',
'-trim',
$cmd = implode(' ', array_map('escapeshellarg', [
'convert',
'-trim',
+ '-background', 'white', '-layers', 'flatten',
'-resize', "${width}x${height}",
'-quality', '90%',
$source, "jpg:$target"
'-resize', "${width}x${height}",
'-quality', '90%',
$source, "jpg:$target"