Jump to content

No matter what I do image stays black (GD) help!


poopinthescoop

Recommended Posts

function buildAvatar(array $imgArray = array())

{

$img1 = imagecreatefrompng($phpbb_root_path.'images/spacer.png');

foreach($imgArray as $img)

{

$img2 = imagecreatefrompng($phpbb_root_path.'avatars/equip_img/'.$img);

$this->imagecopymerge_alpha($img1, $img2, 0, 0, 0, 0, 210, 300, 100);

}

imagealphablending($img1, false);

imagesavealpha($img1, true);

return $img1;

}

 

The background of my PNG was transparent, I don't know what I did, but it's now black! I'm thinking it's the image! Not the code, this same code worked before, and I've tried tons of different ways of fixing it. How should I save the image to work correctly?

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.