Streaming Dynamic Image

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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top