Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Set background color of PNG?

Reply
Thread Tools

Set background color of PNG?

 
 
Mark B
Guest
Posts: n/a
 
      12-07-2008
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)

 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      12-07-2008
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-...ent-png-in-ie6



-- bruce (sqlwork.com)


Mark B wrote:
> 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)
>

 
Reply With Quote
 
 
 
 
Hillbilly
Guest
Posts: n/a
 
      12-07-2008
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.

"Mark B" <> wrote in message
news:%...
>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)
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
rounded corners in which my border color is different than the background color laredotornado@zipmail.com Javascript 1 02-14-2007 07:37 AM
How to set Panel background color? Shapper ASP .Net 0 09-29-2005 06:45 PM
Set TextBox Background Color Wayne Wengert ASP .Net 3 02-12-2005 05:45 PM
Problem with setting background color alternating item in datalist to a certain color fig000 ASP .Net Web Controls 0 09-06-2004 06:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57