Merge pull request #2563 from acs-ferreira/patch-1

Create GDimage from data if JPEG fails - Fix #2561
This commit is contained in:
buddh4 2017-05-31 13:02:19 +02:00 committed by GitHub
commit 90896d827b

View File

@ -355,7 +355,10 @@ class ImageConverter
$gdImage = imagecreatefromgif($fileName);
break;
case IMAGETYPE_JPEG:
$gdImage = imagecreatefromjpeg($fileName);
$gdImage = @imagecreatefromjpeg($fileName);
if (!$gdImage) {
$gdImage = imagecreatefromstring(file_get_contents($fileName));
}
break;
}
} catch (\Exception $ex) {