poopinthescoop 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? Link to comment https://forums.phpfreaks.com/topic/251665-no-matter-what-i-do-image-stays-black-gd-help/ 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? Link to comment https://forums.phpfreaks.com/topic/251665-no-matter-what-i-do-image-stays-black-gd-help/#findComment-1290665 Share on other sites More sharing options...
poopinthescoop 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. Link to comment https://forums.phpfreaks.com/topic/251665-no-matter-what-i-do-image-stays-black-gd-help/#findComment-1290681 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.