Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Explorer and PNG arn't lovers?! 2

Status
Not open for further replies.

drkside2

Technical User
Jul 8, 2004
21
SE
Hi everyone :)

I have encountered a very odd problem when I was working with a page. the thing is that I used FIR method, to replace text with images, and I choose format PNG.

It seams that internet explorer don't like PNG, cause first, I made the PNG transparent, and it worked fine in FireFox Mozilla, but in IE it was white instead of transparent.

Then I said "okej, I will play it your way", luckly the background is one color this time, so I made the background in another color #FFB400 to match the background. for my suprise, when I tested it on IE I got a slitly diffrent color, I took a Print Scrn on it, and viewd it in Photoshop, it was FFCA00, it was a diffrent color...Why? Do IE hate me or do it hate PNG?

I tired with Jpeg, it worked fine, but the size, PNG 5 KB Jpeg 11 KB, I tried GIF, but the picture loses to much quality. so any help on this one I would be very greatfull to :)

thnx....to research more on your own here is my website:


THNX!!
 
It seems white (#FFFFFF) transparent color png pictures works normally (in IE 5.5 and 6.0) with any backgrounds.
May be it helps...
 
hi

it didn't work, I get the color white as it is (ffffff), but when I make it transparent I got another color than fff... :(

thnx
 

IE/Win has notoriously bad PNG support. Alpha transparency is non-existent AFAIK. IE/Mac, however, has near-perfect PNG support.

IE/Win also suffers from discrepancies with background colours (used in HTML/CSS) and background colours on images. They do differ when rendered in the browser - as you have now found.

To get around this, I've always used either used GIF images with transparent backgrounds, or tried to get the colours on the website to match with those in the image by tweaking them (for IE only, of course - something that can be done with conditional comments, for example).

Hope this helps,
Dan
 
Hi, thnx so the problem is with support, hmm... when I try to make it in gif, I get white dots in some places...

but, dear Vragabond, I have noticed something, when I want to save the PNG file, I get only 2 choices, 16 or 24 bit, and the site you gave me says 32-bits, maybe it is because of 24 and 32 bit color change, that the IE mixes in them...and is there a program that can save with 32 bit png? :)

thnx
 
IE and PNG don't mix, stick to good ole JPEGs & GIFs.

When I try to make it in gif, I get white dots in some places

You shouldn't do. What image program are you using? Make sure it isn't limiting itself to "web safe" colours or something.

That said, even GIFs sometimes get rendered in a subtly different colour to what they really are (which is what all that web-safe colour business was intended to avoid). One way round it is to create a small image file which is a solid block of your background colour, and use it as a background image. That way whatever colour rendering errors you get should be the same in both cases.

Alternatively, you could side-step the imaging problems altogether by embedding the font you want in your site. See faq215-4042 for a step-by-step. It won't work in all browsers though (just IE and later Mozilla builds AFAIK).

-- Chris Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top