Monthly Archives: October 2007

>Wishes for Java 2D

>A couple of months ago, I started using Java 2D for pregenerating large amounts of images to be used in a website. To make them look great, I use features such as translucency, gradients, anti-aliasing for text and shapes and fractional metrics.

Although Java 2D works fairly well (although with some annoying bugs on Mac OS X) and offers a simple and consistent API, there’s still some features I’d really like to see added:

  1. Color quantization, first and foremost. I want to be able to convert a full color image to a 4-, 16- or 256-color pallette and then save it in GIF- or PNG-format. Currently I use the command-line pngquant program as an alternative solution.
  2. Configurable character spacing. Currently, character spacing (not character width) is fixed.
Leave a comment

Posted by on 30 October 2007 in 2d, graphics, java, java2d