Set background color of PNG?

  • Thread starter Thread starter Mark B
  • Start date Start date
M

Mark B

I have a PNG (a globe created in Adobe Illustrator) with transparency
outside the circle. It displays fine on IE 7 but on IE 6 the area outside
the circle is a peach color.

How can I set the transparent area outside the globe to be white (so that at
least for <= IE 6 it is white outside the globe)?

Dim strFrameFileName As String =
HttpContext.Current.Server.MapPath("~/pages/images/image_globe.png")
Dim imgFrame As Bitmap = DirectCast(Image.FromFile(strFrameFileName),
Bitmap)
Dim g As Graphics = Graphics.FromImage(imgFrame)
 
you are going to hate this. IE 6.0 only supports 8 bit transparent
png's. if your image is simple without at lot of shading it should look
ok as 8 bit.

if you need 24 bit, then there is an IE 6.0 hack using a downloaded
filter, but it has some restrictions. here is a good article:

http://24ways.org/2007/supersleight-transparent-png-in-ie6



-- bruce (sqlwork.com)
 
The easiest? Just edit the file in a paint program and change the peachy
color to white and maintain transparency for white noting any other white in
the image will be also be transparent in browsers that support png
transparency.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top