I'm creating a minecraft skin generator, but the php code doesn't show me the transparent image:
This is what it shows me: image: https://i.stack.imgur.com/pmldC.png
I can't put the images to show
It shows me the black background and what I'm trying to achieve is to make it transparent (white color)
Thus: image: https://i.stack.imgur.com/Q6D5y.png I can't put the images to show
This is the code I'm using:
<?php
// Crear instancias de imágenes
$origen = imagecreatefrompng("https://jose89fcb.es/SkinMinecraftVistaPreviaDiscord/navidad/Traje_entero.png");
$destino = imagecreatefrompng("http://textures.minecraft.net/texture/3084a678ada05e08058555c11383be71bf8419fa0c2fc89b5aa0be8d00aeb9a0");
$contenedor = imagecreatetruecolor(imagesx($destino), imagesy($destino));
//ver el tamaño de la original
// Copiar
imagecopy($contenedor, $destino, 0, 0, 0, 0, imagesx($destino), imagesy($destino));
imagecopy($contenedor, $origen, 0, 0, 0, 0, imagesx($origen), imagesy($origen));
// Imprimir y liberar memoria
header('Content-Type: image/png');
imagepng($contenedor);
imagedestroy($destino);
imagedestroy($origen);
imagedestroy($contenedor);
?>
These two images should be displayed in the same image: https://textures.minecraft.net/texture/3084a678ada05e08058555c11383be71bf8419fa0c2fc89b5aa0be8d00aeb9a0
https://jose89fcb.es/SkinMinecraftVistaPreviaDiscord/navidad/Traje_entero.png
Remaining the images like this: https://i.stack.imgur.com/7qdzI.png
Where is the problem?
Thank you very much in advance!
Can someone help me, thank you very much