summaryrefslogtreecommitdiffstats
path: root/lib/image.php
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-01-01 18:07:46 +0100
committerThomas Tanghus <thomas@tanghus.net>2012-01-01 18:07:46 +0100
commitc500c1e9307fd10f009f19351a101083969bfed2 (patch)
tree5e83da81d38dca828113c98d9ea35057b8839c58 /lib/image.php
parent6207c0444be7c383838beb0ddc3d684ffee0262b (diff)
downloadnextcloud-server-c500c1e9307fd10f009f19351a101083969bfed2.tar.gz
nextcloud-server-c500c1e9307fd10f009f19351a101083969bfed2.zip
Removed some denug statements and an exception thrown.
Diffstat (limited to 'lib/image.php')
-rw-r--r--lib/image.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/image.php b/lib/image.php
index 4b63ea5ff36..67290d21f3a 100644
--- a/lib/image.php
+++ b/lib/image.php
@@ -189,7 +189,7 @@ class OC_Image {
public function resize($maxsize) {
if(!self::$resource) {
OC_Log::write('core','OC_Image::resize, No image loaded', OC_Log::ERROR);
- throw new Exception('OC_Image::resize, No image loaded!', self::ERR_NO_IMAGE);
+ return false;
}
$width_orig=imageSX(self::$resource);
$height_orig=imageSY(self::$resource);
@@ -231,14 +231,11 @@ class OC_Image {
}
$width_orig=imageSX(self::$resource);
$height_orig=imageSY(self::$resource);
- OC_Log::write('core','OC_Image::centerCrop. Original size: '.$width_orig.'x'.$height_orig, OC_Log::DEBUG);
if($width_orig === $height_orig) {
return true;
}
$ratio_orig = $width_orig/$height_orig;
- OC_Log::write('core','OC_Image::centerCrop. Ratio: '.$ratio_orig, OC_Log::DEBUG);
$width = $height = min($width_orig, $height_orig);
- OC_Log::write('core','OC_Image::centerCrop. New size: '.$width.'x'.$height, OC_Log::DEBUG);
if ($ratio_orig > 1) {
$x = ($width_orig/2) - ($width/2);