summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-11-30 10:32:51 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-11-30 10:32:51 +0100
commit6fa748621f30e7577ebb36487784fee1677e2ba6 (patch)
tree7ad2cb0b57355905093e4f34a874847c9b3c7d99
parent40badba7034077b565853c3a823d892ece1d224a (diff)
parente2a9bd78385aa4f30c99f622d4a53aa7accfe04c (diff)
downloadnextcloud-server-6fa748621f30e7577ebb36487784fee1677e2ba6.tar.gz
nextcloud-server-6fa748621f30e7577ebb36487784fee1677e2ba6.zip
Merge pull request #12398 from oparoz/patch-5
You can only change the oritentation of a JPEG
-rw-r--r--lib/private/image.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/image.php b/lib/private/image.php
index bab91745c05..ecdad084c02 100644
--- a/lib/private/image.php
+++ b/lib/private/image.php
@@ -311,6 +311,10 @@ class OC_Image {
* @return int The orientation or -1 if no EXIF data is available.
*/
public function getOrientation() {
+ if ($this->imageType !== IMAGETYPE_JPEG) {
+ OC_Log::write('core', 'OC_Image->fixOrientation() Image is not a JPEG.', OC_Log::DEBUG);
+ return -1;
+ }
if(!is_callable('exif_read_data')) {
OC_Log::write('core', 'OC_Image->fixOrientation() Exif module not enabled.', OC_Log::DEBUG);
return -1;