From 1852f984c056ae483892638fd0a8c629bf706342 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 06 Nov 2014 03:24:44 -0500
Subject: [PATCH] Call exif_read_data() only on JPEG images
---
program/lib/Roundcube/rcube_image.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/program/lib/Roundcube/rcube_image.php b/program/lib/Roundcube/rcube_image.php
index 122b5f4..495800d 100644
--- a/program/lib/Roundcube/rcube_image.php
+++ b/program/lib/Roundcube/rcube_image.php
@@ -206,7 +206,7 @@
$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']) {
--
Gitblit v1.9.1