aboutsummaryrefslogtreecommitdiffstats
path: root/include/Photo.php
diff options
context:
space:
mode:
authorChris Case <kahotep@bunda.dreamhost.com>2011-05-21 21:40:16 -0700
committerChris Case <kahotep@bunda.dreamhost.com>2011-05-21 21:40:16 -0700
commit4cff911939b263993eb41682ca558c975e2db01f (patch)
tree78f58e08d04413827744689d0f5df7660bee6caa /include/Photo.php
parent2cf696d0b5d647e1741d2f94ee379aa19b25ae1b (diff)
parentf3f063c0dd7fd8b706987b856d79c7b58924acbb (diff)
downloadvolse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.tar.gz
volse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.tar.bz2
volse-hubzilla-4cff911939b263993eb41682ca558c975e2db01f.zip
merged multipart email changes
Diffstat (limited to 'include/Photo.php')
-rw-r--r--include/Photo.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/Photo.php b/include/Photo.php
index 9934b9a39..707b0de5d 100644
--- a/include/Photo.php
+++ b/include/Photo.php
@@ -162,12 +162,20 @@ class Photo {
}
public function saveImage($path) {
- imagejpeg($this->image,$path,100);
+ $quality = get_config('system','jpeg_quality');
+ if((! $quality) || ($quality > 100))
+ $quality = JPEG_QUALITY;
+ imagejpeg($this->image,$path,$quality);
}
public function imageString() {
ob_start();
- imagejpeg($this->image,NULL,100);
+
+ $quality = get_config('system','jpeg_quality');
+ if((! $quality) || ($quality > 100))
+ $quality = JPEG_QUALITY;
+
+ imagejpeg($this->image,NULL,$quality);
$s = ob_get_contents();
ob_end_clean();
return $s;