The Daily Click ::. Forums ::. General Chat ::. PNG test site
 

Post Reply  Post Oekaki 
 

Posted By Message

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
11th January, 2005 at 14:04:12 -

Hiya, just a quicky-

I'm planning on using alpha PNG files in a new site design of mine, and I'm incorporating a little fix to let IE view the transparency.

Browser compatability isn't my greatest concern, so I only really test in recent versions of IE (generally 5 or higher, unless I can find a PC with version 4 installed) and Firefox. Amongst people I know, I've found these are the only brands of browser they use. I've tested this script in IE6 and Firefox 0.9, and it works perfectly in both.

But I'd appreciate it if you could all quickly check that the page works on your browser too?

http://www.snorland.com/~robbie/harrington/template/pngtest/test.html

Please, if you have browsers other than Firefox and IE, I especially would like you to test this.

Thanks ever so much!

 
191 / 9999 * 7 + 191 * 7

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
11th January, 2005 at 14:15:01 -

Works fine in FF and IE. Nice fix! Didn't think it could be done.

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

jast



Registered
  03/01/2014 01:12:19
Points
  186
11th January, 2005 at 14:53:04 -

1. My status bar only displays "done", not what you said it would display

2. The picture does blend with the background - however, it doesn't do it perfectly on the right hand side. Although I guess it's just an imperfect alpha channel, I thought I should let you know since that was what you asked for

3. Don't you use blue on red!?!

4. I'm using FF 1.0

 
n/a

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
11th January, 2005 at 14:58:35 -

Firefox 1.0: Statusbar says "Done", Immage appears correctly.

IE6: Statusbar says "IE is using PNG filter". No image appears at all, it's all just a red background. However right clicking where the image should be still has the "Save picture as..." etc. menu.

 
- Tigerworks

醤油の兵士

Almost Human

Registered
  12/06/2002
Points
  173

VIP Member
11th January, 2005 at 15:22:45 -

well, I've completly disabnled IE on my computer, so I won't test it there. Works fine in FF though, and will work fine in Opera, Mozilla, and Netscape too, IE just plain sucks, doesn't it

 
As a boy, I wanted to be a train. I didn’t realize this was unusual—that other kids played with trains, not as them.

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
11th January, 2005 at 15:26:57 -

Works with IE (and FF) on my PC. I heard about using DirectX to fix that before, but I never saw anyone actually try and use it.

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
11th January, 2005 at 15:31:39 -

Works for me on FF1.0 & IE6.0, but in FF1.0 is just says Done in the bottom left hand corner like it does every other page after its loaded.

 
http://www.facebook.com/truediamondgame

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
11th January, 2005 at 16:25:52 -

Hmm, it's odd that Tigsy's IE6 isn't showing it up. It sounds like the PNG filter simply isn't working for him, and I dunno why that could be. Maybe some kind of security setting has disabled it?

The status thing in Firefox 1.0 doesn't bother me too much, that's mainly to determine whether the browser is trying to kid Javascript into thinking it's IE when it isn't (apparently some do that). If it says 'IE is using PNG filter' and you aren't using IE, then you know your Browser's telling porkies

The way the page works is based on a fix from Microsoft involving CSS filters.

The page starts off with a IMG tag where SRC is the address of the PNG file. But it also has a CSS style telling it to show that same PNG file using a filter.

If you view the page in Firefox, it won't understand the filter, so it just ignores it. Then it will draw the SRC png file the same way it always does - perfectly, complete with alpha transparency. This is what most browsers should do.

If you view the page in Internet Explorer, then CSS runs the filter and draws the PNG properly. However, the next thing IE will try doing is drawing the PNG itself - not only will this IE-generated PNG picture not have transparency, but it will put it ON TOP OF our pretty CSS picture. So to stop it doing this, a javascript changes the src attribute so that it points to a transparent gif file instead. This way, IE draws the gif instead, and we can see straight through it to reveal the nice css picture underneath.

Not nearly as complicated as it sounds


 
191 / 9999 * 7 + 191 * 7

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
11th January, 2005 at 16:27:53 -

works fine with FF1.0 and IE 6.0.2900 SP2. cool fix!

 
www.thenatflap.co.uk

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
11th January, 2005 at 17:08:41 -

Cool!

Although you know what I said about some browsers pretending to be IE when they're not? Well Opera is one of 'em, it turns out!

But not many people use it, so I'm happy enough with it mainly working in Firefox, Netscape and IE6

 
191 / 9999 * 7 + 191 * 7

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
11th January, 2005 at 17:46:54 -

works in Netscape=works on safari. woo!

ps. works for me (IE6, SP2, most recent IE version)

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
11th January, 2005 at 18:15:10 -

Mac IE has good PNG support, so you wouldn't want it running on that. (How many people actually use IE on Mac anyway?)

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
11th January, 2005 at 19:00:27 -

Hardly anyone here uses Mac if you can recall the old Mac bash post a while back. Anyway, they did do alot of fixing to the IESP2, but FireFox is still alot better.

 
http://www.facebook.com/truediamondgame

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
12th January, 2005 at 12:07:16 -

Sorry Dines! Turned out I'm using IE5. I used to have IE6, but I recently reinstalled Windows 2000 and I dont use IE so it's just the default installation.
Sorry if I caused you any headaches

 
- Tigerworks

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
12th January, 2005 at 12:52:50 -

lol, don't worry

 
191 / 9999 * 7 + 191 * 7
   

Post Reply



 



Advertisement

Worth A Click