Option for setting quality

This commit is contained in:
tcit 2014-05-19 15:24:11 +02:00
parent 03e501dedd
commit 1d6a9ac25a
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View 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);