T
Tscheihpih
Hello
Mozilla has no problem with this code and streams the image correctly
back to the client. But with my IE 5.0, the images cannot be
displayed. What's wrong with this code?
OutputStream out = response.getOutputStream();
response.setContentType( "image/jpg" );
BufferedImage outimage = new BufferedImage(
500,500,BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = outimage.createGraphics();
g2d.setBackground(Color.WHITE);
g2d.drawLine(1,1,100,100);
g2d.dispose();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
encoder.encode(outimage);
Mozilla has no problem with this code and streams the image correctly
back to the client. But with my IE 5.0, the images cannot be
displayed. What's wrong with this code?
OutputStream out = response.getOutputStream();
response.setContentType( "image/jpg" );
BufferedImage outimage = new BufferedImage(
500,500,BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = outimage.createGraphics();
g2d.setBackground(Color.WHITE);
g2d.drawLine(1,1,100,100);
g2d.dispose();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
encoder.encode(outimage);