I am using offscreen rendering to create a BufferedImage which I save to
disk as a GIF file. This works fine except for the number of colors that
are in the image. For a GIF file this is limited to 256, so there appear to
be 2 choices:
1) use a filter to reduce the number of colors in the BufferedImage
that is populated by J3D
2) configure J3D to only use a limited number of colors
Option 1) would seem possible but time consuming to execute, option 2)
would therefore appear to be the favored solution.
Looking at GraphicsEnvironment, GraphicsDevice and GraphicsConfiguration,
it hints at this but I can't figure out how to get a GraphicsDevice
configured for a offscreen image? In fact all the examples I have seen use
GraphicsEnvironment.getDefaultScreenDevice() to get the GraphicsDevice,
even when using offscreen rendering. As GraphicsConfigTemplate3D only sets
the minimum requirements, that doesn't seem to help in this case.
So the question is can J3D be configured to use a limited number of colors
(say 2 bits per color), alternatively have anyone any experience in
reducing the number of colors in a existing BufferedImage?
Thanks
- John
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".