Older versions of some big-name programs (Internet Explorer (v6 and older), Adobe Photoshop (v7 and older)) cannot correctly open 32-bit (24-bit color, 8-bit alpha) PNG files with alpha channel transparency. The below image has a yellow background that should be transparent, but is visible in broken programs.
8-bit color with transparency![]() |
32-bit color with transparency![]() |
How it looks in broken programs![]() |
PNG Alpha Test image should look like this:![]() |
PNG Alpha Test image looks like this in your browser:![]() |
How it looks in broken programs![]() |
<?php $Image = ImageCreateTrueColor(80, 40); $back = ImageColorAllocate($Image, 255, 255, 0); $red = ImageColorAllocate($Image, 255, 0, 0); $green = ImageColorAllocate($Image, 0, 255, 0); $black = ImageColorAllocate($Image, 0, 0, 0); ImageColorTransparent($Image, $back); ImageFilledRectangle($Image, 0, 0, 80, 40, $back); ImageArc($Image, 20, 20, 32, 32, 120, 0, $red); ImageString($Image, 5, 20, 20, "hello", $black); ImagePNG($Image, "c:/bad.png"); ?>