]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Option for setting quality
authortcit <tcit@tcit.fr>
Mon, 19 May 2014 13:24:11 +0000 (15:24 +0200)
committertcit <tcit@tcit.fr>
Mon, 19 May 2014 13:24:11 +0000 (15:24 +0200)
inc/poche/config.inc.default.php
inc/poche/pochePictures.php

index edc42fc9f4e7115df34e68384903e756a8582513..0e82f0cd22330ae93ce500c0fbc897018e8864c1 100755 (executable)
@@ -31,6 +31,7 @@
 @define ('MODE_DEMO', FALSE);
 @define ('DEBUG_POCHE', FALSE);
 @define ('DOWNLOAD_PICTURES', FALSE);
+@define ('REGENERATE_PICTURES_QUALITY'), 75);
 @define ('CONVERT_LINKS_FOOTNOTES', FALSE);
 @define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE);
 @define ('SHARE_TWITTER', TRUE);
index f10cc25e929be32ea78144e59c16b879f8fd1629..97eb56ac660f4793c3dfa24ff513af094cf8dacd 100644 (file)
@@ -94,10 +94,10 @@ function download_pictures($absolute_path, $fullpath)
                         break;
                     case 'image/jpeg':
                     case 'image/jpg':
-                        imagejpeg($im, $fullpath); // default quality is 75%
+                        imagejpeg($im, $fullpath, REGENERATE_PICTURES_QUALITY);
                         break;
                     case 'image/png':
-                        imagepng($im, $fullpath);
+                        imagepng($im, $fullpath, REGENERATE_PICTURES_QUALITY);
                         break;
                 }
                 imagedestroy($im);