summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authordeva <deva>2010-01-26 12:30:52 +0000
committerdeva <deva>2010-01-26 12:30:52 +0000
commitc3bc3d8165e5970fe880e3ff209be893e47e20fa (patch)
tree5912e337bdad42dadd23fbef6a05cd5095b69b38 /utils
parent3b632ba6ef388405f3f21edeb1bf83f1ed0a71f9 (diff)
Make jpeg thumbnail quality configurable.
Diffstat (limited to 'utils')
-rw-r--r--utils/imagecache.php6
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
+?>