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)
 
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.
 
Back
Top