J'ai récupérer ce code, mais je n'ai qu'un carré gris quand je l'affiche

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function image_overlap($background, $foreground){
	$image = imagecreatefromjpeg("carte/1-1.jpg");->image de fond 
	$insert = imagecreatefrompng("carte/maison.png");->image du dessu
	$image = image_overlap($image, $insert);
	$insertWidth = imagesx($foreground);
	$insertHeight = imagesy($foreground);
 
	$imageWidth = imagesx($background);
	$imageHeight = imagesy($background);
	$overlapX = $imageWidth-$insertWidth-5;
	$overlapY = $imageHeight-$insertHeight-5;
               imagecolortransparent($foreground,imagecolorat($foreground,0,0));
               imagecopymerge($background,$foreground,$overlapX,$overlapY,0,0,$insertWidth,$insertHeight,100);
   return $background;
 
    }
 
$tab[1][1] = array('img' => (emplacement de mon image, 'marche' => 0, 'tag' => 0, 'movable' => 0);
Un peu d'aide serait la bienvenue, merci d'avance
Stéphane