aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2017-03-30 14:45:24 +0200
committerGitHub <noreply@github.com>2017-03-30 14:45:24 +0200
commit548e608870572d30962aefd0542b361dcf94b82e (patch)
tree41578cf354f4cb73a07c69cc05004445f95d4415 /src/Wallabag
parent90f95027a8c713047fc436bce271cb3e52bc3dee (diff)
parent7a3260ae9e1095beff4621e7031068a83c6a3ab1 (diff)
downloadwallabag-548e608870572d30962aefd0542b361dcf94b82e.tar.gz
wallabag-548e608870572d30962aefd0542b361dcf94b82e.tar.zst
wallabag-548e608870572d30962aefd0542b361dcf94b82e.zip
Merge pull request #3017 from Kdecherf/local-image-alpha
Save alpha channel when downloading PNG images
Diffstat (limited to 'src/Wallabag')
-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 }