Merging two partially-transparent images results in black pixels

From: Date: Sun, 19 Mar 2006 03:16:41 +0000
Subject: Merging two partially-transparent images results in black pixels
Groups: php.general 
Request: Send a blank email to php-general+get-232208@lists.php.net to get a copy of this message
Hello, I have an image that uses partial transparency for borders and such. At first, I tried using the whole image; creating a truecolor 'holder' image, then imagecopymerge-ing it, but that resulted in the outside transparent areas (the ones that would instead show the 'holder' image) were black, while the portions of transparency on the inside (these are rounded-squares) that had actual other images below them were white. Then, I made two images. One having the outside transparency, and setting imagesavealpha to make it work as intended... then adding the needed images, then adding the 'window'-type transparent image on top. This gives the best result, but the 'window' image also has partial transparency, and is instead showing in black. I'm pretty much at wit's end. Everything's imagecopymerge'd, I've tried just about everything I could think of. Can you actually not have two transparent images on top of one another? Is there something else I can try? And as an offshoot question, why won't any transparent images natively load/import as transparent? I always seem to have to call imagecolortransparent on portions that are definitely transparent in Photoshop, etc. Any help would be much appreciated! Thank you -Jason Young

« previous php.general (#232208) next »