Archived

This topic is now archived and is closed to further replies.

Mace

[java] argh, could someone explain why browsers dither alpha images?

Recommended Posts

What JDK are u using to display the images? If you are relaying on JDK 1.3 i have to tell you, if you don''t know it yet, that the Internet Browsers such as Internet Explorer and Netscape needs a JRE 1.3 Plugin to support a JDK that is higher then 1.1.8. So that might be one problem that you don''t see them working in your browsers. For the alpha thing, i don''t know why that doesn''t work.

Share this post


Link to post
Share on other sites
Ok, the 1.1.8 jdk didnt help with the dithering problem.

It looks like this in appletviewer:
http://hem.bredband.net/johgly/screen.gif

And like this in IE:
http://hem.bredband.net/johgly/screen2.gif

Share this post


Link to post
Share on other sites
The reason for the dithering in IE is because you are using an alpha value not of 255 in your image.

I used this feature for the scanner in Nebuloids.

I am not sure of later versions of the jdk (it could be just an AWT issue), but lower versions (1.0 & 1.1) used dithering to achieve alpha transparency and since IE''s MS JVM only get''s as high as 1.1 then you will have to find another way....

You could build your own blitting methods with transparency (very easy for transperencies of %50) and if you are drawing enough images then you will actually get a speed increase doing your own blit methods on the normal AWT image drawing.... :-)

Share this post


Link to post
Share on other sites