thumb: decrease preferred quality to 85%
[minimedit.git] / thumb / index.php
index b4f6091f5005ec405e433504ebb1f98d098cbb36..c65cab3dab9ea7ebb2227ded9e4a2b984b845d7e 100644 (file)
@@ -1,6 +1,4 @@
 <?php
-ob_clean();
-
 list ($size, $imgpath) = explode('/', ltrim($Args, '/'), 2);
 $imgpath = preg_replace('{^(?=[0-9]+/)}', 'data/', $imgpath, 1);
 
@@ -89,10 +87,12 @@ function mkthumb_exec($source, $target, $width, $height)
        }
        $cmd = implode(' ', array_map('escapeshellarg', [
                'convert',
+               '-delete', '1--1', # static
                '-trim',
-               '-background', 'white', '-layers', 'flatten',
+               '-background', 'white', '-layers', 'flatten', # opaque
+               '-interlace', 'plane', # progressive
                '-resize', "${width}x${height}",
-               '-quality', '90%',
+               '-quality', '85%',
                $source, "jpg:$target"
        ]));
        $return = shell_exec("$cmd 2>&1");