Rapide Advanced Adulte
 
 Web|Image|Shop|Video|News|Wmx|Mobile|Wiki|Ajouter ce moteur

     Manuel PHP     
Partager
 
 
Partager
Partager

 

Table :

.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
.imagecreatefromgd2
.imagecreatefromgd2part
.imagecreatefromgd
.imagecreatefromgif
.imagecreatefromjpeg
.imagecreatefrompng
.imagecreatefromstring
.imagecreatefromwbmp
.imagecreatefromxbm
.imagecreatefromxpm
.imagecreatetruecolor
.imagedashedline
.imagedestroy
.imageellipse
.imagefill
.imagefilledarc
.imagefilledellipse
.imagefilledpolygon
.imagefilledrectangle
.imagefilltoborder
.imagefilter
.imagefontheight
.imagefontwidth
.imageftbbox
.imagefttext
.imagegammacorrect
.imagegd2
.imagegd
.imagegif
.imageinterlace
.imageistruecolor
.imagejpeg
.imagelayereffect
.imageline
.imageloadfont
.imagepalettecopy
.imagepng
.imagepolygon
.imagepsbbox
.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
 
   

  imagecreatefromstring  


imagecreatefromstring

(PHP 4 >= 4.0.4, PHP 5)

imagecreatefromstring -- Crée une image à partir d'une chaîne

Description

resource imagecreatefromstring ( string data )

imagecreatefromstring() retourne un identifiant d'image représentant l'image obtenu depuis la chaîne image. Le type de l'image sera automatiquement détecté si vous avez compilé PHP avec les supports : JPEG, PNG, GIF, WBMP et GD2.

Liste de paramètres

image

Une chaîne contenant les données de l'image

Valeurs de retour

Une ressource d'image sera retourné en cas de succès. FALSE est retourné si le type de l'image n'est pas supporté, si les données ne sont pas dans un format reconnu ou si l'image est corrompue et donc ne peut être chargée.

Exemples

Exemple 1. Exemple avec imagecreatefromstring()

<?php
$data
= 'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABl'
       
. 'BMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDr'
       
. 'EX4IJTRkb7lobNUStXsB0jIXIAMSsQnWlsV+wULF4Avk9fLq2r'
       
. '8a5HSE35Q3eO2XP1A1wQkZSgETvDtKdQAAAABJRU5ErkJggg==';
$data = base64_decode($data);

$im = imagecreatefromstring($data);
if (
$im !== false) {
    
header('Content-Type: image/png');
    
imagepng($im);
}
else {
    echo
'An error occurred.';
}
?>

L'exemple ci-dessus va afficher quelque chose de similaire à :


    Annonces       
 

 Retour au chapitre Php

 

Top
 

Ajouter JungleKey.fr à votre Explorateur

 
 

About Us | © 2007 JungleKey




iBlack | Mobile | Wiki | Ajouter ce moteur
.