I am trying to layer these:



into this:

But what I keep getting is this:

This is the relevant code, Im not sure what Im missing:
$sig_background = imagecreatefrompng("sanctum-signature.png");
imagealphablending($sig_background, false);
imagesavealpha($sig_background, true);
$sig_gamertile = imagecreatefrompng($gamertile_masked_file);
imagealphablending($sig_gamertile, false);
imagesavealpha($sig_gamertile, true);
$sig_gametile = imagecreatefrompng($gametile_masked_file);
imagealphablending($sig_gamertile, false);
imagesavealpha($sig_gamertile, true);
imagecopymerge($sig_background, $sig_gamertile, 175, 2, 0, 0, 64, 64, 100);
imagecopymerge($sig_background, $sig_gametile, 342, 20, 0, 0, 64, 64, 100);
If any more information is missing, please let me know and Ill try to fill in the blanks. Thank you for your time.
edit – here are links to the files (hosted on photobucket)
gamertile
gametile
There’s a typo in your code, is it a copy/paste error or a real bug?
You do:
And then:
But straight afterwards, you continue to call functions on
$sig_gamertileinstead of$sig_gametile:Obviously radically renaming some vars would help guard against this.