Skip to content

Commit

Permalink
Merge pull request #109 from flaviocopes/patch-1
Browse files Browse the repository at this point in the history
Only process fixOrientation if the image is jpg/tiff
  • Loading branch information
Gregwar authored Jun 12, 2016
2 parents 3dc2675 + 1dd6daa commit a89da22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Adapter/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ public function cropResize($width = null, $height = null, $background = 'transpa
*/
public function fixOrientation()
{
if (!in_array(exif_imagetype($this->source->getInfos()), array(IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM))) {
return $this;
}

if (!extension_loaded('exif')) {
throw new \RuntimeException('You need to EXIF PHP Extension to use this function');
}
Expand Down

0 comments on commit a89da22

Please sign in to comment.