From 1d6a9ac25aa0ee1a51b3fcc70bc4247ff14c54e2 Mon Sep 17 00:00:00 2001 From: tcit Date: Mon, 19 May 2014 15:24:11 +0200 Subject: Option for setting quality --- inc/poche/config.inc.default.php | 1 + inc/poche/pochePictures.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php index edc42fc9..0e82f0cd 100755 --- a/inc/poche/config.inc.default.php +++ b/inc/poche/config.inc.default.php @@ -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); diff --git a/inc/poche/pochePictures.php b/inc/poche/pochePictures.php index f10cc25e..97eb56ac 100644 --- a/inc/poche/pochePictures.php +++ b/inc/poche/pochePictures.php @@ -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); -- cgit v1.2.3