summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_image.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-10-24 19:08:21 +0200
committerAleksander Machniak <alec@alec.pl>2014-11-06 09:24:44 +0100
commit1852f984c056ae483892638fd0a8c629bf706342 (patch)
tree6a463181493912ff095bffa1bbc586eb0693c7b0 /program/lib/Roundcube/rcube_image.php
parenta4289060e62ece4f4bd35bb00b2d03022afe012c (diff)
Call exif_read_data() only on JPEG images
Diffstat (limited to 'program/lib/Roundcube/rcube_image.php')
-rw-r--r--program/lib/Roundcube/rcube_image.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_image.php b/program/lib/Roundcube/rcube_image.php
index 122b5f48a..495800d00 100644
--- a/program/lib/Roundcube/rcube_image.php
+++ b/program/lib/Roundcube/rcube_image.php
@@ -206,7 +206,7 @@ class rcube_image
$image = $new_image;
// fix rotation of image if EXIF data exists and specifies rotation (GD strips the EXIF data)
- if ($this->image_file && function_exists('exif_read_data')) {
+ if ($this->image_file && $type == 'jpg' && function_exists('exif_read_data')) {
$exif = exif_read_data($this->image_file);
if ($exif && $exif['Orientation']) {
switch ($exif['Orientation']) {