diff options
author | Friendika <info@friendika.com> | 2011-05-04 02:20:44 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-05-04 02:20:44 -0700 |
commit | 59fd70e568fbc93922769333c55d8c1fa72cea9d (patch) | |
tree | 091e462af7cd7851c6ff3790e47c5e019d2c18bc /include | |
parent | 64a7d0b578ae3264eb65bd4ad1c20a38d63cf3bf (diff) | |
download | volse-hubzilla-59fd70e568fbc93922769333c55d8c1fa72cea9d.tar.gz volse-hubzilla-59fd70e568fbc93922769333c55d8c1fa72cea9d.tar.bz2 volse-hubzilla-59fd70e568fbc93922769333c55d8c1fa72cea9d.zip |
issues with private photos - hitting internal size limits
Diffstat (limited to 'include')
-rw-r--r-- | include/Photo.php | 12 | ||||
-rw-r--r-- | include/items.php | 1 |
2 files changed, 11 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; diff --git a/include/items.php b/include/items.php index c5ecac777..3a3085f1b 100644 --- a/include/items.php +++ b/include/items.php @@ -701,6 +701,7 @@ function item_store($arr,$force_parent = false) { $parent_id = 0; $arr['thr-parent'] = $arr['parent-uri']; $arr['parent-uri'] = $arr['uri']; + $arr['gravity'] = 0; } else { logger('item_store: item parent was not found - ignoring item'); |