thumb: delete subsequent animation frames
[minimedit.git] / thumb / index.php
index b4f6091f5005ec405e433504ebb1f98d098cbb36..fbea220b2bf7d48f5b0ae556862063c30271a816 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,6 +87,7 @@ function mkthumb_exec($source, $target, $width, $height)
        }
        $cmd = implode(' ', array_map('escapeshellarg', [
                'convert',
+               '-delete', '1--1',
                '-trim',
                '-background', 'white', '-layers', 'flatten',
                '-resize', "${width}x${height}",