diff options
author | deva <deva> | 2010-01-26 12:30:52 +0000 |
---|---|---|
committer | deva <deva> | 2010-01-26 12:30:52 +0000 |
commit | c3bc3d8165e5970fe880e3ff209be893e47e20fa (patch) | |
tree | 5912e337bdad42dadd23fbef6a05cd5095b69b38 /utils | |
parent | 3b632ba6ef388405f3f21edeb1bf83f1ed0a71f9 (diff) |
Make jpeg thumbnail quality configurable.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/imagecache.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/imagecache.php b/utils/imagecache.php index 39c741e..ba5fcb2 100644 --- a/utils/imagecache.php +++ b/utils/imagecache.php @@ -33,7 +33,7 @@ function errorImage($message) function getCachedImage($filename, $maxwidth, $maxheight) { - global $IMAGECACHE; + global $IMAGECACHE, $JPEG_CACHE_QUALITY; $fullfilename = $IMAGECACHE . "/" . $maxwidth . ":" . $maxheight . ":". urlencode($filename); // Test the storage dir @@ -61,7 +61,7 @@ function getCachedImage($filename, $maxwidth, $maxheight) $image = imagecreatefromjpeg(urldecode($filename)); if(!$image) errorImage("Could not read: ". $filename); $image = rescale($image, $maxwidth, $maxheight); - imagejpeg($image, $fullfilename, 90); + imagejpeg($image, $fullfilename, $JPEG_CACHE_QUALITY); break; case ".gif": @@ -95,4 +95,4 @@ function getCachedImage($filename, $maxwidth, $maxheight) readfile($fullfilename); } -?>
\ No newline at end of file +?> |