HardwareHeaven.com
Looking for the skin chooser?
 
 
  • Home

  • Reviews

  • Articles

  • News

  • Tools

  • GamingHeaven

  • Forums

  • Network

 

Go Back   HardwareHeaven.com > Forums > Software / Tools > Programming, Coding, (Web)Design


Programming, Coding, (Web)Design Discuss all your programming or design needs with likeminded people.

Reply
 
Thread Tools
Old Jan 18, 2003, 03:31 PM   #1
A Legend in Underwear
 
UberLord's Avatar
 
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 70
UberLord will become famous soon enough

Cool! PNG Filter for IE on Win32

If you use PNG images over say GIF images and really hated when IE on Windows doesn't support the alpha channel (for transparent backgrounds)?

Well, panic no more. DriverHeaven is running a special filtering javascript that filters all IMG tags pointing to a PNG file through a DirectX control so that transparencies work with IE 5.5 or higher

Credit where credit is due. Thanks goto the guys at WebFX for the initial solution. I couldn't get their .htc file to work for anyone but me, so I wrote this little javascript instead.

I've put it under the LGPL, so feel free to use it on your own websites at no charge. If you can make any improvements to the code, then email them to me at uberlord@driverheaven.net or post them here!

Download the JavaScript file here

Use the follow code in your script to reference it
Code:
<script type="text/javascript" language="javascript" src="ieWin32_png_filter.js">
    <!-- Forces IE to display PNG images through DirectX -->
</script>
__________________
Gentoo Linux - Developer (baselayout)
Read my blog

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours."
Stephen Roberts
UberLord is offline   Reply With Quote


Old Jan 20, 2003, 11:16 AM   #2
Unbiased.
 
Join Date: Jun 2002
Posts: 4,812
Rep Power: 0
ToshiroOC is on a distinguished road

Though I know I personally won't have much use for it, I just want to thank Uberlord for releasing it under the LGPL - its pretty important to keep things freely available
__________________
[img][/img]
[color=White]Peace be with you, Joe.[/color]
Driverheaven Staff Member (Supermoderator)
ToshiroOC is offline   Reply With Quote
Old Jan 20, 2003, 11:57 AM Threadstarter Thread Starter   #3
A Legend in Underwear
 
UberLord's Avatar
 
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 70
UberLord will become famous soon enough

Quote:
Originally posted by ToshiroOC
Though I know I personally won't have much use for it, I just want to thank Uberlord for releasing it under the LGPL - its pretty important to keep things freely available
I see no point in charging for it. And I'd much rather promote PNG - which is patent free - over GIF which isn't and costs.

Besides, if anyone can improve on my code then they're more than welcome to
__________________
Gentoo Linux - Developer (baselayout)
Read my blog

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours."
Stephen Roberts
UberLord is offline   Reply With Quote
Old Jan 20, 2003, 12:23 PM   #4
confutatis maledictis
 
Vampyromaniac's Avatar
 
Join Date: May 2002
Location: somewhere dark
Posts: 5,974
Rep Power: 74
Vampyromaniac is a jewel in the roughVampyromaniac is a jewel in the roughVampyromaniac is a jewel in the roughVampyromaniac is a jewel in the rough
System Specs

I liked the quality of PNG when I first saw it, but nobody seems to use it . . .

Also, great scripting, man
Vampyromaniac is offline   Reply With Quote
Old Jan 20, 2003, 03:49 PM Threadstarter Thread Starter   #5
A Legend in Underwear
 
UberLord's Avatar
 
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 70
UberLord will become famous soon enough

Quote:
Originally posted by Vampyromaniac
I liked the quality of PNG when I first saw it, but nobody seems to use it . . .
Me 2 - hopefully people can start using PNG's now
However, JavaScript is required and some peeps disable it completely.
I'd still prefer MS to fix bloody IE though

Quote:
Also, great scripting, man
I really like my ego being stroked - thats why I'm a developer
__________________
Gentoo Linux - Developer (baselayout)
Read my blog

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours."
Stephen Roberts
UberLord is offline   Reply With Quote
Old Jan 20, 2003, 07:31 PM   #6
BSD SMASH!
 
Malus's Avatar
 
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0
Malus is on a distinguished road

A lot of people prefer .gif because they have a smaller filesize. Personally, I think the .png's are pretty nice though.
__________________
quad (FreeBSD/amd64 8-CURRENT): Intel Q6600 - Asus P5E-VM HDMI - 2x2 GB Kingston PC6400 DDR2 Ram - Seagate 320GB 7200RPM HD - 2xSeagate 1TB 7200RPM HD in RAID 1 via ZFS - Lite-On 20x DVD Multi Recorder - Coolermaster Centurion 5

router (FreeBSD/amd64 8-CURRENT):
Intel E4500 - Intel D945GCNL - 2 GB PC6400 Mushkin Ram - Lite-On 48x24x48x16 - Seagate 320GB 7200RPM HD - Silverstone SST-SG02-F

wanderer (FreeBSD/i386 7-CURRENT): Lenovo Thinkpad T61p

mini (OS X 10.5): Intel Core 2 Duo @ 1.8Ghz, 4 GB Mushkin PC5400 Ram -
Headroom MicroDAC

Portable sound: Rockboxed iPod Video -> Westone UM2's
Not-So-Portable Sound: Headroon MicroDAC -> Singlepower PPX3-SLAM -> Grado RS-1's or Beyerdynamic DT-880's
Very-Not-Portable-Sound: Squeezebox v3 -> Denon AVR-1507 -> B&W 683's & Sunfire HRS-10
Malus is offline   Reply With Quote
Old Jan 20, 2003, 07:32 PM   #7
DriverHeaven Founder
 
Join Date: May 2002
Posts: 32,480
Rep Power: 177
Zardon has a reputation beyond refuteZardon has a reputation beyond refuteZardon has a reputation beyond refuteZardon has a reputation beyond refuteZardon has a reputation beyond refuteZardon has a reputation beyond refuteZardon has a reputation beyond refuteZardon has a reputation beyond refuteZardon has a reputation beyond refuteZardon has a reputation beyond refuteZardon has a reputation beyond refute

gif are limited to 256 colours. which is why PNG has such a benefit.
Zardon is offline   Reply With Quote
Old Jan 20, 2003, 07:32 PM Threadstarter Thread Starter   #8
A Legend in Underwear
 
UberLord's Avatar
 
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 70
UberLord will become famous soon enough

Thumbs Down!

Quote:
Originally posted by Malus
A lot of people prefer .gif because they have a smaller filesize. Personally, I think the .png's are pretty nice though.
Odd. All my PNG images bar 2 have smaller filesizes than GIF
__________________
Gentoo Linux - Developer (baselayout)
Read my blog

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours."
Stephen Roberts
UberLord is offline   Reply With Quote
Old Jan 20, 2003, 08:53 PM   #9
Yarr... I be blind!
 
Jeff's Avatar
 
Join Date: May 2002
Location: Calgary, Canada
Posts: 3,190
Rep Power: 74
Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!

PNG also has lossless compression, and MNG has animation, PNG/MNG is just a heck of a lot better than all other single-layer graphic formats. (Aside from vector images)
__________________
Jeff is offline   Reply With Quote
Old Jan 21, 2003, 12:44 AM Threadstarter Thread Starter   #10
A Legend in Underwear
 
UberLord's Avatar
 
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 70
UberLord will become famous soon enough

???

Quote:
Originally posted by Cyborg
PNG also has lossless compression
I thought that GIF was lossless compression?
__________________
Gentoo Linux - Developer (baselayout)
Read my blog

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours."
Stephen Roberts
UberLord is offline   Reply With Quote
Old Jan 21, 2003, 12:56 AM   #11
Unbiased.
 
Join Date: Jun 2002
Posts: 4,812
Rep Power: 0
ToshiroOC is on a distinguished road

It is, but only for 256 bit I think...
__________________
[img][/img]
[color=White]Peace be with you, Joe.[/color]
Driverheaven Staff Member (Supermoderator)
ToshiroOC is offline   Reply With Quote
Old Jan 21, 2003, 01:31 AM   #12
Yarr... I be blind!
 
Jeff's Avatar
 
Join Date: May 2002
Location: Calgary, Canada
Posts: 3,190
Rep Power: 74
Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!

Its not completely lossless, because of the way it has to dither it to 256 colors.
__________________
Jeff is offline   Reply With Quote
Old Jan 21, 2003, 01:47 AM   #13
BSD SMASH!
 
Malus's Avatar
 
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0
Malus is on a distinguished road

Actually, I'm mistaken. I'm thinking about JPEG vs 24-bit PNG. There is an 8-bit PNG which is probably comparable to the GIF format. 24-bit PNGs are really big though.
__________________
quad (FreeBSD/amd64 8-CURRENT): Intel Q6600 - Asus P5E-VM HDMI - 2x2 GB Kingston PC6400 DDR2 Ram - Seagate 320GB 7200RPM HD - 2xSeagate 1TB 7200RPM HD in RAID 1 via ZFS - Lite-On 20x DVD Multi Recorder - Coolermaster Centurion 5

router (FreeBSD/amd64 8-CURRENT):
Intel E4500 - Intel D945GCNL - 2 GB PC6400 Mushkin Ram - Lite-On 48x24x48x16 - Seagate 320GB 7200RPM HD - Silverstone SST-SG02-F

wanderer (FreeBSD/i386 7-CURRENT): Lenovo Thinkpad T61p

mini (OS X 10.5): Intel Core 2 Duo @ 1.8Ghz, 4 GB Mushkin PC5400 Ram -
Headroom MicroDAC

Portable sound: Rockboxed iPod Video -> Westone UM2's
Not-So-Portable Sound: Headroon MicroDAC -> Singlepower PPX3-SLAM -> Grado RS-1's or Beyerdynamic DT-880's
Very-Not-Portable-Sound: Squeezebox v3 -> Denon AVR-1507 -> B&W 683's & Sunfire HRS-10
Malus is offline   Reply With Quote
Old Jan 21, 2003, 02:04 AM   #14
Yarr... I be blind!
 
Jeff's Avatar
 
Join Date: May 2002
Location: Calgary, Canada
Posts: 3,190
Rep Power: 74
Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!

not as big as you'd think, i'm using a 32-bit 189 x 355 PNG on my site, which works out to 9.3kb, full color, with alpha layer...
__________________
Jeff is offline   Reply With Quote
Old Jan 21, 2003, 02:09 AM   #15
BSD SMASH!
 
Malus's Avatar
 
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0
Malus is on a distinguished road

Really? Last time I used it, I was getting 100k+ files when I converted PSD which had a size of only 256x256 pixels.
__________________
quad (FreeBSD/amd64 8-CURRENT): Intel Q6600 - Asus P5E-VM HDMI - 2x2 GB Kingston PC6400 DDR2 Ram - Seagate 320GB 7200RPM HD - 2xSeagate 1TB 7200RPM HD in RAID 1 via ZFS - Lite-On 20x DVD Multi Recorder - Coolermaster Centurion 5

router (FreeBSD/amd64 8-CURRENT):
Intel E4500 - Intel D945GCNL - 2 GB PC6400 Mushkin Ram - Lite-On 48x24x48x16 - Seagate 320GB 7200RPM HD - Silverstone SST-SG02-F

wanderer (FreeBSD/i386 7-CURRENT): Lenovo Thinkpad T61p

mini (OS X 10.5): Intel Core 2 Duo @ 1.8Ghz, 4 GB Mushkin PC5400 Ram -
Headroom MicroDAC

Portable sound: Rockboxed iPod Video -> Westone UM2's
Not-So-Portable Sound: Headroon MicroDAC -> Singlepower PPX3-SLAM -> Grado RS-1's or Beyerdynamic DT-880's
Very-Not-Portable-Sound: Squeezebox v3 -> Denon AVR-1507 -> B&W 683's & Sunfire HRS-10
Malus is offline   Reply With Quote
Old Jan 21, 2003, 11:14 AM Threadstarter Thread Starter   #16
A Legend in Underwear
 
UberLord's Avatar
 
Join Date: May 2002
Location: Unknown
Posts: 5,255
Rep Power: 70
UberLord will become famous soon enough

Quote:
Originally posted by Malus
Really? Last time I used it, I was getting 100k+ files when I converted PSD which had a size of only 256x256 pixels.
Depends on which program you use really.
PSP 6 on Win32 which I sometimes use @ work produces PNG files about twice as big as say The GIMP on Linux.
__________________
Gentoo Linux - Developer (baselayout)
Read my blog

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours."
Stephen Roberts
UberLord is offline   Reply With Quote
Old Jan 21, 2003, 05:36 PM   #17
Yarr... I be blind!
 
Jeff's Avatar
 
Join Date: May 2002
Location: Calgary, Canada
Posts: 3,190
Rep Power: 74
Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!Jeff is just super!

I find PS7 does a good job of them, didn't ever try it with older versions of PS>
__________________
Jeff is offline   Reply With Quote
Reply

Bookmarks

Thread Tools