Citation :
if ($sql_image) // test de l'operation mysql
{
$width = $infos_img[0];
$height = $infos_img[1]; while (($width > 300) or ($height > 200)) //Redimension
{
$height = ($height/10)*9;
$width = ($width/10)*9;
} // Fin redimension
$dest = imagecreatetruecolor($width, $height);
if ($infos_img[2] == 2) {$src = imagecreatefromjpeg('./album/' . $name);}
if ($infos_omg[2] == 3) {$src = imagecreatefrompng('./album/' . $name);}
$min = imagecopyresampled($dest, $src, 0, 0, 0, 0, $width, $height, $infos_img[0], $infos_img[1]);
if ($infos_img[2] == 2) {imagejpeg($dest , './miniature/min_' . $name, 100);}
if ($infos_omg[2] == 3) {imagepng($dest , './miniature/min_' . $name);}
imagedestroy($dest);
imagedestroy($src);
|