I am wondering if I am doing something wrong, or if it is as good as I am going to get. Both PNGs on the left are 95x111. The robot image has about 5 pixels or so of transparent pixels around it, but it looks like they cause merging problems?

$avatar = imagecreatefrompng("../guy.png"); $borderImg = imagecreatefrompng("../frame.png"); imagealphablending( $borderImg, false ); imagesavealpha( $borderImg, true ); imagecopyresampled($avatar,$borderImg, 0, 0, 0, 0, 95, 111,95, 111); imagepng($avatar, $newfilenameBig);
I tried every combination of simulation images and images that I can think of. When I set $ avatar to imagesavealpa = true, then it doesn't even display the image like everyone else, just a frame. Doesn't that seem strange? Is this how much can I use PHP GD?
UPDATE: the desired result can be achieved when both images are manually created in PS using 24-bit mode. Is there a way to do this using imagecopy or the like?
source share