From: Andrew Poulos on
PNG with an alpha channels needs something with this

elem.style.filter =
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + filename +
"', sizingMethod='image')";

to get the transparency to not show.

This link
<url:
http://msdn.microsoft.com/en-us/library/ms532847%28VS.85%29.aspx#Scripting_Filters
>
indicates that to dynamically add as part of the filter collection I
should be able to do

c.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src =
filename;
c.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").sizingMethod
= "image";

Alas, IE 6 gives me "Unspecified error".

I can't set the style.filter property because I think that will
overwrite the filter that already exists on the element.

Andrew Poulos
From: Thomas 'PointedEars' Lahn on
Andrew Poulos wrote:

> PNG with an alpha channels needs something with this
>
> elem.style.filter =
> "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + filename +
> "', sizingMethod='image')";
>
> to get the transparency to not show.

Probably you mean "to show".

> This link
> <url:
> http://msdn.microsoft.com/en
> us/library/ms532847%28VS.85%29.aspx#Scripting_Filters
> >
> indicates that to dynamically add as part of the filter collection I
> should be able to do
>
> c.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src =
> filename;
>
c.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").sizingMethod
> = "image";
>
> Alas, IE 6 gives me "Unspecified error".

In which line?

If the references work (don't breed Reference Worms[tm]!), and `filename'
is not the culprit, use "crop" for `sizingMethod' instead; I have never
used "image" to do this, it is the (documented) default value anyway.

<http://msdn.microsoft.com/en-us/library/ms532920%28VS.85%29.aspx>

> I can't set the style.filter property because I think that will
> overwrite the filter that already exists on the element.

(Told you.) It will if you do not take care.


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee