I am using acme's GifEncoder to dynamically create a chart in gif format. I can get
the image to be created, but it is always in black and white. It seems that it does
not work in true color, but when I switch to 16-bit color it seems to work. How do I
get this to work in true-color mode?
Here is an example of the method that I am using:
public void doGet(HttpServletRequest request, HttpServletResponse response)
{
OutputStream out = response.getOutputStream();
Frame frame = new Frame();
frame.addNotify();
Image image = frame.createImage( 100, 100 );
Graphics graphics = image.getGraphics();
graphics.setColor( Color.red );
graphics.drawOval(0, 0, 99, 99);
response.setContentType( "image/gif" );
GifEncoder encoder = new GifEncoder( image, out );
encoder.encode();
out.flush();
}
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html