views:

780

answers:

1

The following code works fine when I have an image in IE6 that i want to make transparent.

<img src="image.png" style="width: 100px; height: 100px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png', sizingMethod='scale')" />

However the following does not. In this example I am using a dynamically generated PNG file.

I assume its because the filter doesn't know that the image is actually a PNG

<img src="/dynimg/createImg.aspx?id=123" style="width: 100px; height: 100px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='dynimg/createImg.aspx?id=123', sizingMethod='scale')" />

Is there any other way to apply the 'filter' and force it to assume that my image is actaully a PNG.

Note: The image.png file in the non-dynamic situation was actually generated by my dynamic aspx page - so theres nothing wrong with the dynamically image created.

A: 

it turns out when you use an IMG control the IMG.src image is displayed on top of the filtered image (which is the transparent one).

i made an assumption that the above works, when in fact it doesnt. i tricked myself into thinking it worked because of the sequence of things i'd done.

It actually doesnt matter if its dynamic or not.

Simon_Weaver