Hi,

I've found that when viewing transparent png files that were created adobe photoshop in IE 6, I get no transparency at all. Yet, when I create an image from those same pngs in php I get a perfect transparency.

Example:

x.png viewed in IE 6 has no transparency instead, a white or light blue background.

yet when I do this:

<? header('Content-Type: image/png');  
$x = imagecreatefrompng('x.png'); imagepng($im); ?>

(something like the above anyway)

and then view that in IE I get perfect transparency!

What's PHP doing to the image? How can I do this in photoshop?

    I'm definitely not an expert at this, but I would say this: don't use IE for PNG/transparency testing. IE has (and still has) broken PNG support.

    Before spending too much time, try viewing the image as is in another browser (like Firefox). Does it show up ok there? If so, you definitely have an IE issue. If it doesn't show up, then you have an issue with the way Photoshop is saving the PNG.

    It seems like the simple solution is to have the GD library generate your PNG and all you need to do is save it and use the new image...

      that's the strange thing, if I view it in any other browser (mozzila, firefox, opera...) or if I use it in Dreamweaver it appears ok until I open it in IE. But, when it's a GD created png it looks fine in IE.

      So, I guess my questions are:

      What's GD doing to my pngs?

      How can I do that in Photoshop or Macromedia Fireworks?

      If you can't answer any of the above, then how can I go about finding my answers?

        Write a Reply...