mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +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]);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user