Removed masking of image extensions' exceptions
This commit is contained in:
parent
48bb4fc803
commit
180252cc64
2 changed files with 6 additions and 20 deletions
|
@ -5,14 +5,7 @@ class GdImageManipulator implements IImageManipulator
|
|||
{
|
||||
public function loadFromBuffer($source)
|
||||
{
|
||||
try
|
||||
{
|
||||
return imagecreatefromstring($source);
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return imagecreatefromstring($source);
|
||||
}
|
||||
|
||||
public function getImageWidth($imageResource)
|
||||
|
|
|
@ -5,18 +5,11 @@ class ImagickImageManipulator implements IImageManipulator
|
|||
{
|
||||
public function loadFromBuffer($source)
|
||||
{
|
||||
try
|
||||
{
|
||||
$image = new \Imagick();
|
||||
$image->readImageBlob($source);
|
||||
if ($image->getImageFormat() == 'GIF')
|
||||
$image = $image->coalesceImages();
|
||||
return $image;
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
$image = new \Imagick();
|
||||
$image->readImageBlob($source);
|
||||
if ($image->getImageFormat() == 'GIF')
|
||||
$image = $image->coalesceImages();
|
||||
return $image;
|
||||
}
|
||||
|
||||
public function getImageWidth($imageResource)
|
||||
|
|
Loading…
Reference in a new issue