Salut,
<?php
header ("Content-type: image/png");
$source[0][0] = imagecreatefrompng("herbe.PNG");
$source[0][1] = imagecreatefrompng("herbe.PNG");
$source[0][2] = imagecreatefrompng("herbe.PNG");
$source[0][3] = imagecreatefrompng("herbe.PNG");
$source[0][4] = imagecreatefrompng("herbe.PNG");
$source[0][5] = imagecreatefrompng("herbe.PNG");
$source[0][6] = imagecreatefrompng("herbe.PNG");
$source[0][7] = imagecreatefrompng("herbe.PNG");
$source[0][8] = imagecreatefrompng("herbe.PNG");
$source[0][9] = imagecreatefrompng("herbe.PNG");
imagepng($source[1][1]);
?>
ça n'est pas corect pour plusieurs raisons :
$source est indfinit
on doit mettre :
$source=array();
$source[0]=array();
et plutot que de demander à GD d'ouvrir l'image pour l'afficher, tu peux faire :
<?php
header ('Content-type: image/png');
$source=array();
$source[0]=array();
$source[0][0] = "herbe.PNG";
$source[0][1] = "herbe.PNG";
$source[0][2] = "herbe.PNG";
[...]
readfile($source[0][0]);
?>
In a dream, I saw me, drop dead... U was there, U cried... It was just a dream, if I die, U won't cry, maybe, U'll be happy
Mon site (articles sur la programmation et programmes)