mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 12:03:14 +00:00
fix error with gd resizer processor
This commit is contained in:
@@ -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]);
|
$size = max($tech_datas[system_file::TC_DATAS_WIDTH], $tech_datas[system_file::TC_DATAS_HEIGHT]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$imag_original = imagecreatefromjpeg($origine->getPathname());
|
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)
|
if ($imag_original)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user