Hi all, I am drawing some lines or any shapes in an applet. now i want to save that drawing or applet into an image like gif or jpeg. one funda is that we will click on one button on applet, it will contact a setvlet on the server and on the server i have to write some code. can any one help me out in this regard as i need it very very urgent. thanks. ------------------
You'll need to convert the applet's canvas into a bitmap, convert the bitmap into JPEG or GIF format, then send the bitmap in a binary file transmission to the server. The server really can't do anything but catch the file - all the work has to be done on the client. As far as getting the bitmap and converting it to image file format, I recommend you ask in the AWT/Swing forum. For object-oriented drawing, you might find it better to render the objects from a list of graphics objects in the applet and transmit the list as a file - this is actually preferable if some other user would be viewing the graphics later, as different users may have different screen resolutions. The downside is that there's no real standard builtin to browsers for object-oriented image display, so you'd have to use a display applet.
An IDE is no substitute for an Intelligent Developer.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads