1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
$pixel=16;
function MapIdImg($id,$pixel)
{
$recup = mysql_query("SELECT img1,img2 FROM map WHERE id='$id'");
$recup = mysql_fetch_array($recup); $img1 = $recup['img1']; $img2 = $recup['img2'];
$img1 = ChipsLink($img1); $img1 = "img/chipset/$img1" ;
$img2 = ChipsLink($img2); $img2 = "img/chipset/$img2" ;
$img = @imagecreate($pixel, $pixel) or die ("Impossible de charger la bibliothéque graphique.");
$img1 = @ImageCreateFromPNG ($img1);
$img2 = @ImageCreateFromPNG ($img2);
ImageCopy ($img, $img1, 0, 0, 0, 0, $pixel, $pixel);
ImageCopy ($img, $img2, 0, 0, 0, 0, $pixel, $pixel);
header ("Content-type: image/png");
imagepng($img);
imagedestroy($img);
return $img;
} |
Partager