From: Jérémy Benoist Date: Thu, 30 Mar 2017 12:45:24 +0000 (+0200) Subject: Merge pull request #3017 from Kdecherf/local-image-alpha X-Git-Tag: 2.2.3~16 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=548e608870572d30962aefd0542b361dcf94b82e;hp=90f95027a8c713047fc436bce271cb3e52bc3dee;p=github%2Fwallabag%2Fwallabag.git Merge pull request #3017 from Kdecherf/local-image-alpha Save alpha channel when downloading PNG images --- diff --git a/src/Wallabag/CoreBundle/Helper/DownloadImages.php b/src/Wallabag/CoreBundle/Helper/DownloadImages.php index c83f9618..0d330d2a 100644 --- a/src/Wallabag/CoreBundle/Helper/DownloadImages.php +++ b/src/Wallabag/CoreBundle/Helper/DownloadImages.php @@ -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'); }