Hi, newbie to applets. Apologize in advance. I have an applet that does the basic drawing. I'm able to get the x/y coordinates. How do I get this into a BufferedImage and convert into a TIFF file. I noticed ImageIO doesn't support TIFF so my options are JAI.
When drawing, I get a string of x and y coordinates. How can I take these coordinates and draw them out and save as an image. I can write a servlet to take the string. Just need to know how to repaint and save that image.
Sorry, I still don't understand what it means to "draw out" a set of coordinates. But let's suppose that whatever that means, you can get a JPanel to display whatever it is. Then here's some code I have which converts that JPanel to a graphics file (a GIF as it happens but there are other options):
Thanks for the reply Paul. However, you did provide some some info. However, I'm using applets. When using applets, it's using the Canvas and drawing using the mouseEvent is collected with the double xy coordinates. What's strange is that there's no info to be found on the web on how to save that canvas drawing into a jpeg, gif, or even a tiff. Any other help would be greatly appreciated.