I've got a jsp tag to display an <img>, or for alpha-transparent pngs in ie6 to display a blank image with the AlphaImageLoader applied to it. My major limitation is that I don't have the image width and height. My current output looks like this:
<img src="blank.gif" style="filter: progid:DXImageTransform.Mi
crosoft.Al
phaImageLo
ader(src=t
heimage.pn
g), sizingMethod=scale;"
class="whatever" alt="whatever" whatever="whatever"
/>
In ie 5.5 sizingMethod=scale seems to work well, but in ie 6 it sometimes scales images to completely wrong dimensions for unknown reasons (padding in css?). Also, if I put one of these <img>s in an anchor, the link hitmap becomes the areas of the image with alpha > 0, instead of the image box. Are there solutions to these problems? Is there some better way to apply this filter on the server-side without access to the image's width and height?
Start Free Trial