bob3335 | Code :
- function resize($file, $dest_width, $dest_eight, $min, $ext)
- {
- $size = getimagesize($GLOBALS["rep"].$file);
- if ($ext=="jpg" ) $src_img = imagecreatefromjpeg($GLOBALS["rep"].$file);
- else $src_img = imagecreatefrompng($GLOBALS["rep"].$file);
- $dst_img = imagecreatetruecolor($dest_width,$dest_eight);
- imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_eight, $size[0], $size[1]);
- if ($ext=="jpg" ) imagejpeg($dst_img, $GLOBALS["rep"].$min.$file, 60);
- else imagepng($dst_img, $GLOBALS["rep"].$min.$file, 60);
- imagedestroy($src_img);
- imagedestroy($dst_img);
- }
|
Mais bon, ca vient d'une limitation de l'hébergeur, pas d'une erreur de script
|