]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Save alpha channel when downloading PNG images 3017/head
authorKevin Decherf <kevin@kdecherf.com>
Wed, 29 Mar 2017 19:58:29 +0000 (21:58 +0200)
committerKevin Decherf <kevin@kdecherf.com>
Wed, 29 Mar 2017 19:58:29 +0000 (21:58 +0200)
Fixes #2805

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
src/Wallabag/CoreBundle/Helper/DownloadImages.php

index c83f96187f8a2c9b01479ae2a15cc34467065231..0d330d2a315c5f01d9d1d11022cde49c7f29ae86 100644 (file)
@@ -144,6 +144,8 @@ class DownloadImages
                 $this->logger->debug('DownloadImages: Re-creating jpg');
                 break;
             case 'png':
+                imagealphablending($im, false);
+                imagesavealpha($im, true);
                 imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9));
                 $this->logger->debug('DownloadImages: Re-creating png');
         }