aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2017-03-29 21:58:29 +0200
committerKevin Decherf <kevin@kdecherf.com>2017-03-29 21:58:29 +0200
commit7a3260ae9e1095beff4621e7031068a83c6a3ab1 (patch)
tree41578cf354f4cb73a07c69cc05004445f95d4415 /src
parent90f95027a8c713047fc436bce271cb3e52bc3dee (diff)
downloadwallabag-7a3260ae9e1095beff4621e7031068a83c6a3ab1.tar.gz
wallabag-7a3260ae9e1095beff4621e7031068a83c6a3ab1.tar.zst
wallabag-7a3260ae9e1095beff4621e7031068a83c6a3ab1.zip
Save alpha channel when downloading PNG images
Fixes #2805 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Helper/DownloadImages.php2
1 files changed, 2 insertions, 0 deletions
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
144 $this->logger->debug('DownloadImages: Re-creating jpg'); 144 $this->logger->debug('DownloadImages: Re-creating jpg');
145 break; 145 break;
146 case 'png': 146 case 'png':
147 imagealphablending($im, false);
148 imagesavealpha($im, true);
147 imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9)); 149 imagepng($im, $localPath, ceil(self::REGENERATE_PICTURES_QUALITY / 100 * 9));
148 $this->logger->debug('DownloadImages: Re-creating png'); 150 $this->logger->debug('DownloadImages: Re-creating png');
149 } 151 }