Image with transparent background
I want to display a curve in J3D without having to draw a zillion line segments and I'm not too concerned about display quality (fineness), so I'm using a J2D shape to create a texture in J3D. I've been able to display the shape successfully by drawing it to a BufferedImage, creating a texture from that and applying the texture to a quad.
The background of the image becomes part of the texture and obscures objects behind it. I'd like the background to be transparent so that only the shape itself appears to be in the scene. I assume I will need to make the quad transparent, too. It seems that a GIF will support a transparent background and might be the solution I need. (Or perhaps there's another way...)
If the solution is a GIF, can I create the GIF from the BufferedImage without writing to disk and just use it directly? I'm new to image processing so I'd appreciate any code snippets that will take the BufferedImage to a GIF.