par
Invité » 26 nov. 2006, 21:49
Bon j'ai essayer
j'ai mi ceci
$resized_img = imagecreatetruecolor($newwidth,$newheight);
$white = imagecolorallocate($resized_img, 255, 255, 255);
$grey = imagecolorallocate($resized_img, 128, 128, 128);
$black = imagecolorallocate($resized_img, 0, 0, 0);
imagefilledrectangle($resized_img, 0, 0, 399, 29, $white);
$text = 'Test...';
$font = 'arial.ttf';
imagettftext($resized_img, 20, 0, 11, 21, $grey, $font, $text);
imagettftext($resized_img, 20, 0, 10, 20, $black, $font, $text);
imagecopyresized($resized_img, $new_img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
//save image
Imagepng ($resized_img,"$path_thumbs/$rand_name-mini.png");
ImageDestroy ($resized_img);
ImageDestroy ($new_img);
mais sa ne marche pas
si une personne me me donner un coup de main
Bon j'ai essayer
j'ai mi ceci
[php]$resized_img = imagecreatetruecolor($newwidth,$newheight);
$white = imagecolorallocate($resized_img, 255, 255, 255);
$grey = imagecolorallocate($resized_img, 128, 128, 128);
$black = imagecolorallocate($resized_img, 0, 0, 0);
imagefilledrectangle($resized_img, 0, 0, 399, 29, $white);
$text = 'Test...';
$font = 'arial.ttf';
imagettftext($resized_img, 20, 0, 11, 21, $grey, $font, $text);
imagettftext($resized_img, 20, 0, 10, 20, $black, $font, $text);
imagecopyresized($resized_img, $new_img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
//save image
Imagepng ($resized_img,"$path_thumbs/$rand_name-mini.png");
ImageDestroy ($resized_img);
ImageDestroy ($new_img);[/php]
mais sa ne marche pas
si une personne me me donner un coup de main