website logo
Auteur
avatar
Pomme

Forum » » Le coin des codeurs » » Fonction de création d'image


Posté : 21-10-2004 16:02 icone du post

Je créé une mini galerie pour les fan art de mon site.
Et j'ai qq probleme...

<?php
$adresseimage 
= $the_path.$nom_img;
list(
$width, $height, $type, $attr) = getimagesize($adresseimage);

$new_height = 85;
$coef_reduc=$new_height/$height;
$coef_reduc=ceil($coef_reduc);//arrondit coef
$new_width=$width*$coef_reduc;

$miniature = imagecreatetruecolor ($new_width, $new_height);
imagecopyresized ($miniature, $adresseimage, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagejpeg ($miniature, "modules/fanart/images/".$nom_img."-mini", 90);
imagedestroy ($miniature);
flush();
?>




Il devrait ici créer une image miniature de la 1ère... mais rien n'est créé il doit manquer une fonction quelque part. Mais où ?
Merci d'avance...

Cet article provient de NPDS REvolution 16
https://lab.grottes-et-karsts-de-chine.org/viewtopic.php?topic=13957&forum=5