Task: Dynamic Color Filtering of Images

One annoyance with using GIF or JPEG images is that their colors are static.  Once you've produced the images, in order to change the colors, you have to pull out a graphics editor and use the tools to change the colors, statically.  What we need instead is the ability to generate graphics with colors that can be altered programmatically and the ability to manipulate the color changes from the XML and XSL.  Then, for example, if we want to change the colors used in the tabs, it would be a matter of declaring the color in the XML/XSL and the programmtic color filtering will take care of the rest.

The solution will need to be implemented in Java.  What is required is a Java Servlet that accepts a particular HTTP request, processes the request, and returns a stream with MIME type image/gif or image/jpeg to the requesting browser.  The servlet would need to use some sort of server-side caching strategy to keep the request-response cycle performant.

Your tasks are: