|
|||||||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,256
Rep Power: 0 ![]() |
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 |
|
|
|
|
|
#2 |
|
Unbiased.
Join Date: Jun 2002
Posts: 4,812
Rep Power: 0 ![]() |
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) |
|
|
|
|
|
#3 | |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,256
Rep Power: 0 ![]() |
Quote:
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 |
|
|
|
|
|
|
#4 |
|
confutatis maledictis
|
I liked the quality of PNG when I first saw it, but nobody seems to use it . . .
![]() Also, great scripting, man
|
|
|
|
|
|
#5 | ||
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,256
Rep Power: 0 ![]() |
Quote:
![]() However, JavaScript is required and some peeps disable it completely. I'd still prefer MS to fix bloody IE though ![]() Quote:
__________________
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 |
||
|
|
|
|
|
#6 |
|
BSD SMASH!
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0 ![]() |
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 |
|
|
|
|
|
#7 |
|
enchanted
Join Date: May 2002
Location: Driverheaven
Posts: 32,260
Rep Power: 3150 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
gif are limited to 256 colours. which is why PNG has such a benefit.
|
|
|
|
|
|
#8 | |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,256
Rep Power: 0 ![]() |
Quote:
__________________
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 |
|
|
|
|
|
|
#9 |
|
Yarr... I be blind!
Join Date: May 2002
Location: Calgary, Canada
Posts: 3,177
Rep Power: 0 ![]() |
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)
__________________
Mr. Simpson, don't you worry. I watched Matlock in a bar last night. The sound wasn't on, but I think I got the gist of it. - Lionel Hutz |
|
|
|
|
|
#10 | |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,256
Rep Power: 0 ![]() |
Quote:
__________________
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 |
|
|
|
|
|
|
#11 |
|
Unbiased.
Join Date: Jun 2002
Posts: 4,812
Rep Power: 0 ![]() |
It is, but only for 256 bit I think...
__________________
[img][/img] [color=White]Peace be with you, Joe.[/color] Driverheaven Staff Member (Supermoderator) |
|
|
|
|
|
#12 |
|
Yarr... I be blind!
Join Date: May 2002
Location: Calgary, Canada
Posts: 3,177
Rep Power: 0 ![]() |
Its not completely lossless, because of the way it has to dither it to 256 colors.
__________________
Mr. Simpson, don't you worry. I watched Matlock in a bar last night. The sound wasn't on, but I think I got the gist of it. - Lionel Hutz |
|
|
|
|
|
#13 |
|
BSD SMASH!
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0 ![]() |
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 |
|
|
|
|
|
#14 |
|
Yarr... I be blind!
Join Date: May 2002
Location: Calgary, Canada
Posts: 3,177
Rep Power: 0 ![]() |
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...
__________________
Mr. Simpson, don't you worry. I watched Matlock in a bar last night. The sound wasn't on, but I think I got the gist of it. - Lionel Hutz |
|
|
|
|
|
#15 |
|
BSD SMASH!
Join Date: May 2002
Location: A rabbit hole. . .
Posts: 1,170
Rep Power: 0 ![]() |
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 |
|
|
|
|
|
#16 | |
|
A Legend in Underwear
Join Date: May 2002
Location: Unknown
Posts: 5,256
Rep Power: 0 ![]() |
Quote:
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 |
|
|
|
|
|
|
#17 |
|
Yarr... I be blind!
Join Date: May 2002
Location: Calgary, Canada
Posts: 3,177
Rep Power: 0 ![]() |
I find PS7 does a good job of them, didn't ever try it with older versions of PS>
__________________
Mr. Simpson, don't you worry. I watched Matlock in a bar last night. The sound wasn't on, but I think I got the gist of it. - Lionel Hutz |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|