imagecreatefromxpm
<<<
imagecreatetruecolor imagedashedline
>>>

6.14 Images
6 Référence des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes pré-définies
Exemples
gd_info
getimagesize
image_type_to_extension
image_type_to_mime_type
image2wbmp
imagealphablending
imageantialias
imagearc
imagechar
imagecharup
imagecolorallocate
imagecolorallocatealpha
imagecolorat
imagecolorclosest
imagecolorclosestalpha
imagecolorclosesthwb
imagecolordeallocate
imagecolorexact
imagecolorexactalpha
imagecolormatch
imagecolorresolve
imagecolorresolvealpha
imagecolorset
imagecolorsforindex
imagecolorstotal
imagecolortransparent
imageconvolution
imagecopy
imagecopymerge
imagecopymergegray
imagecopyresampled
imagecopyresized
imagecreate
imagecreatefromgd
imagecreatefromgd2
imagecreatefromgd2part
imagecreatefromgif
imagecreatefromjpeg
imagecreatefrompng
imagecreatefromstring
imagecreatefromwbmp
imagecreatefromxbm
imagecreatefromxpm
->imagecreatetruecolor
imagedashedline
imagedestroy
imageellipse
imagefill
imagefilledarc
imagefilledellipse
imagefilledpolygon
imagefilledrectangle
imagefilltoborder
imagefilter
imagefontheight
imagefontwidth
imageftbbox
imagefttext
imagegammacorrect
imagegd
imagegd2
imagegif
imageinterlace
imageistruecolor
imagejpeg
imagelayereffect
imageline
imageloadfont
imagepalettecopy
imagepng
imagepolygon
imagepsbbox
imagepscopyfont
imagepsencodefont
imagepsextendfont
imagepsfreefont
imagepsloadfont
imagepsslantfont
imagepstext
imagerectangle
imagerotate
imagesavealpha
imagesetbrush
imagesetpixel
imagesetstyle
imagesetthickness
imagesettile
imagestring
imagestringup
imagesx
imagesy
imagetruecolortopalette
imagettfbbox
imagettftext
imagetypes
imagewbmp
imagexbm
iptcembed
iptcparse
jpeg2wbmp
png2wbmp

6.14.51 imagecreatetruecolor()Crée une nouvelle image en vraies couleurs

[ Exemples avec imagecreatetruecolor ]   PHP 4 >= 4.0.6, PHP 5

resource  imagecreatetruecolor ( int   x_size , int   y_size )

imagecreatetruecolor retourne une ressource représentant une image noire de largeur x_size , et de hauteur y_size .

Suivant votre version de PHP et de GD, cette fonction est définie ou non. De PHP version 4.0.6 à la version 4.1.x, cette fonction existe toujours si le module GD est chargé, mais l'appeler sans avoir GD2 d'installé fera que PHP lancera une erreur fatale et sortira. Avec PHP 4.2.x, ce comportement est différent et PHP lancera une alerte au lieu d'une erreur. Pour les autres versions de PHP, cette fonction n'est définie que si une version correcte de GD est installée.

Création d'un flux d'image GD, et affichage

<?php
header
("Content-type: image/png");
$im = @imagecreatetruecolor (50, 100)
      or die (
"Impossible de crée un flux d'image GD");
$text_color = imagecolorallocate ($im, 233, 14, 91);
imagestring ($im, 1, 5, 5,  "Une simple chaîne de texte", $text_color);
imagepng ($im);
imagedestroy ($im);
?>

Note

Cette fonction requiert la bibliothèque GD 2.0.1 ou supérieure.

Note

imagecreatetruecolor ne fonctionne pas avec le format GIF .

Voir aussi imagedestroy et imagecreate .

<< imagecreatetruecolor >>
imagecreatefromxpm Images imagedashedline