From: Mischa POSLAWSKY Date: Fri, 12 Jul 2019 00:33:50 +0000 (+0200) Subject: thumb: flatten transparent images to white background X-Git-Tag: v4.0~3 X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/85271527e754ad247974966b8899c1c2a3226b07 thumb: flatten transparent images to white background Ensure consistent background for some SVG and PNG originals. --- diff --git a/thumb/index.php b/thumb/index.php index 27a194e..f15a180 100644 --- a/thumb/index.php +++ b/thumb/index.php @@ -89,6 +89,7 @@ function mkthumb_exec($source, $target, $width, $height) $cmd = implode(' ', array_map('escapeshellarg', [ 'convert', '-trim', + '-background', 'white', '-layers', 'flatten', '-resize', "${width}x${height}", '-quality', '90%', $source, "jpg:$target"