Permalink
Browse files

Fixed a bug where the script would generate a warning if "auto_handle…

…_exif_orientation" was TRUE and the image in case was not a JPEG; thanks to @Hoffi1
  • Loading branch information...
stefangabos committed Aug 21, 2017
1 parent 9e5c817 commit ee74e46888df7b7b5104209cf585345281f6c373
Showing with 4 additions and 4 deletions.
  1. +4 −4 Zebra_Image.php
View
@@ -25,7 +25,7 @@
* Read more {@link https://github.com/stefangabos/Zebra_Image/ here}
*
* @author Stefan Gabos <contact@stefangabos.ro>
* @version 2.2.7 (last revision: July 12, 2017)
* @version 2.2.7 (last revision: August 21, 2017)
* @copyright (c) 2006 - 2017 Stefan Gabos
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU LESSER GENERAL PUBLIC LICENSE
* @package Zebra_Image
@@ -89,7 +89,7 @@ class Zebra_Image {
public $error;
/**
* If set to TRUE, images will be auto-rotated according to the {@link http://keyj.emphy.de/exif-orientation-rant/ Exif Orientation Tag}
* If set to TRUE, JPEG images will be auto-rotated according to the {@link http://keyj.emphy.de/exif-orientation-rant/ Exif Orientation Tag}
* so that they are always shown correctly.
*
* <samp>If you set this to TRUE you must also enable exif-support with --enable-exif. Windows users must enable both
@@ -1345,8 +1345,8 @@ private function _create_from_source() {
// make available the source image's identifier
$this->source_identifier = $identifier;
// if we need to handle exif orientation automatically
if ($this->auto_handle_exif_orientation)
// for JPEG files, if we need to handle exif orientation automatically
if ($this->auto_handle_exif_orientation && $this->source_type === IMAGETYPE_JPEG)
// if "exif_read_data" function is not available, return false
if (!function_exists('exif_read_data')) {

0 comments on commit ee74e46

Please sign in to comment.