English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
imagecolorallocate — Crée une image basée sur le panneau de couleurs.
imagecreate ( int $x_size , int $y_size ) : resource
imagecolorallocate() renvoie un identifiant d'image, représentant une image blanche de taille x_size et y_size.
<?php header("Content-type: image/png $im = @imagecreate(100, 50) ou meurt("Impossible d'initialiser un nouveau flux d'image GD"); $background_color = imagecolorallocate($im, 255, 255, 255); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, "Une simple chaîne de texte", $text_color); imagepng($im); imagedestroy($im); ?>