diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-03-06 17:18:17 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-03-06 17:18:17 +0100 |
commit | 1b8cf18c9163cf6d16d679500a86def95bfc0384 (patch) | |
tree | 7e7bf09d1a580612d2b90b5892dc0091d6fbe3c0 /lib | |
parent | 256dca935bbd683515912f555cee90f8cc43b341 (diff) | |
parent | fc01a13811f5da395f1a9ed1171f15f5fffcb71e (diff) | |
download | nextcloud-server-1b8cf18c9163cf6d16d679500a86def95bfc0384.tar.gz nextcloud-server-1b8cf18c9163cf6d16d679500a86def95bfc0384.zip |
Merge pull request #7182 from owncloud/imagerotate_and_loadbase64_fix
Fix imagerotate and move loadFromBase64() one up
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/image.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/private/image.php b/lib/private/image.php index da32aa4760f..a4a23f0f097 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -331,7 +331,7 @@ class OC_Image { break; } if($rotate) { - $res = imagerotate($this->resource, $rotate, -1); + $res = imagerotate($this->resource, $rotate, 0); if($res) { if(imagealphablending($res, true)) { if(imagesavealpha($res, true)) { @@ -367,10 +367,10 @@ class OC_Image { } elseif(in_array(get_resource_type($imageRef), array('file', 'stream'))) { return $this->loadFromFileHandle($imageRef); } - } elseif($this->loadFromFile($imageRef) !== false) { - return $this->resource; } elseif($this->loadFromBase64($imageRef) !== false) { return $this->resource; + } elseif($this->loadFromFile($imageRef) !== false) { + return $this->resource; } elseif($this->loadFromData($imageRef) !== false) { return $this->resource; } else { @@ -401,7 +401,6 @@ class OC_Image { public function loadFromFile($imagePath=false) { // exif_imagetype throws "read error!" if file is less than 12 byte if(!@is_file($imagePath) || !file_exists($imagePath) || filesize($imagePath) < 12 || !is_readable($imagePath)) { - // Debug output disabled because this method is tried before loadFromBase64? OC_Log::write('core', 'OC_Image->loadFromFile, couldn\'t load: ' . (string) urlencode($imagePath), OC_Log::DEBUG); return false; } |