fix error with gd resizer processor

This commit is contained in:
Nicolas Le Goff
2012-01-06 16:33:33 +01:00
parent 554e657d68
commit 85a78052ea

View File

@@ -99,7 +99,22 @@ class binaryAdapter_image_resize_gd extends binaryAdapter_processorAbstract
$size = max($tech_datas[system_file::TC_DATAS_WIDTH], $tech_datas[system_file::TC_DATAS_HEIGHT]);
}
switch($origine->get_mime())
{
case "image/jpeg" :
$imag_original = imagecreatefromjpeg($origine->getPathname());
break;
case "image/gif" :
$imag_original = imagecreatefromgif($origine->getPathname());
break;
case "image/png" :
$imag_original = imagecreatefrompng($origine->getPathname());
break;
default:
return $this;
break;
}
if ($imag_original)
{