]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Helper/DownloadImages.php
Merge pull request #3023 from mart-e/epub-notice-at-the-end
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Helper / DownloadImages.php
index 264bc6a3eba7cb30ddedcad79821de83dac8341a..0d330d2a315c5f01d9d1d11022cde49c7f29ae86 100644 (file)
@@ -36,7 +36,7 @@ class DownloadImages
     {
         // if folder doesn't exist, attempt to create one and store the folder name in property $folder
         if (!file_exists($this->baseFolder)) {
-            mkdir($this->baseFolder, 0777, true);
+            mkdir($this->baseFolder, 0755, true);
         }
     }
 
@@ -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');
         }