I'm trying to draw some images with GDlib, but the transparency doesn't work. I tried already the simple example from php.net:
$im1 = imagecreatetruecolor(200, 200);
$background = imagecolorallocate($im1, 255, 255, 255);
imagecolortransparent($im1, $background);
imagealphablending($im1, false);
imagesavealpha($im1, true);
header('Content-type: image/png');
imagepng($im1);
imagedestroy($im1);
but it also doesn't work. The transparent background is black. I don't resize anything, don't merge multiple images, I just want to create a transparent image. I'm working with PHP 5.5.28 on OS X Yosemite installed with Homebrew.
I would be very appreciated for any help.