Spring Posted November 23, 2011 Share Posted November 23, 2011 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? Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted November 23, 2011 Share Posted November 23, 2011 My advice is to see if your image paths are accessable, a changed permissions maybe? Quote Link to comment Share on other sites More sharing options...
Spring Posted November 23, 2011 Author Share Posted November 23, 2011 The image is showing up fine, but when i does, its black. It's suppose to just be a transparent square. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.