Thanks, I am already doing that, but I specifically want to be able to create gif's as 
well, hence the number of colors question.
 - John

On Friday, August 11, 2000 3:10 PM, Michael Bandy [SMTP:[EMAIL PROTECTED]] wrote:
> What about using JPEG from JDK 1.2 and later (com.sun.image.codec.jpeg.*) -
> then you'd have the full 16 million colors available.
>
> -----Original Message-----
> From: John Mosley [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 11, 2000 8:57 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Controlling the number of colors rendered
>
>
> 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".
>

===========================================================================
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".

Reply via email to