Anti-Aliasing using PNG Alpha-channels |
|
Amaya and AlphaNoticing W3C's Amaya-browser lacking support of PNG transparency, alpha and background colors, I ventured into a project to see if that could be improved. After only little discussions we all agreed that the current 7-bit palette based color-model should be replaced with a full-color RGBA model. However, after starting off, that task appeared to be too daunting, at least for me with no knowledge of the graphics library used for Amaya. So, I opted for an in-between solution. Still using colormaps (however doubling the entries), but with the addition of a full 8-bit alpha channel for GIFs and PNGs. For transparency maps we just use the values 0 and 255.If you want to upgrade your Amaya 2.1 release and you don't want to wait for the official W3C release, you just have to replace a few files, after which you need to recompile. A few words of caution: I was only able to implement this in the Win32 port of Amaya and the new stuff definitely needs some further testing to increase its robustness. |
|
Anti-AliasingNow having such a capable browser, it was time to show off its new features. And for me the highest priority in the use of alpha-channels should be given to improvement of anti-aliasing. We all know the ugly outlines with the remains of an old background color. As shown in the top line of the image above, this is really unnecessary. I created that line of text by using a big red rectangle as foreground color, with the fonts "opaque on transparent" stored in the alpha-channel. And the whole thing of course on a white/black background.Comparing how different browsers take care of alpha-channels, I have created screen-dumps of four, all running on Windows platforms. As you can see, the results are rather bad. Plenty of space for improvements . And if you want to test if your latest-greatest browser is doing better than the screen-shots below, click here and wait-and-see. |
click on images for full-size versions |