Jump to content

2 PNG Overlays


mattal999

Recommended Posts

Hi,

 

I have this script:

 

<?php

header('content-type: image/png');

$head="images/head/1.png";
$hair="images/hair/1.png";
$x=0;
$y=0;

$head=imagecreatefrompng($head);
imagealphablending($head, true);
$hair=imagecreatefrompng($hair);
imagealphablending($hair, true);
imagecopy($head, $hair, 0, 0, 0, 0, 150, 300);
imagepng($head);
imagedestroy($img);

?>

 

Which produces this:

 

avatar.php

 

As you can see, it has messed up somewhere in the line. I tried it with head being a jpeg and it worked perfectly. I am not sure why it is doing this but do you guys have any ideas on how to fix it?

 

Cheers.

 

 

Link to comment
https://forums.phpfreaks.com/topic/135409-2-png-overlays/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.