>Date:         Fri, 30 Mar 2001 10:45:45 -0500
>Reply-To:     Discussion list for Java 3D API <[EMAIL PROTECTED]>
>Sender:       Discussion list for Java 3D API <[EMAIL PROTECTED]>
>From:         Pedro Estrada <[EMAIL PROTECTED]>
>Subject:      Re: Image capturing (snapshots) - offscreen rendering
>Content-Type: text/plain; charset="iso-8859-1"

>Try using BufferdImage.TYPE_INT_RGB and
>ImageComponent2D.TYPE_RGB instead of the RGBA formats
>you are using.  My code matches yours in all other respects and
>I performing offscreen screen caps successfully.
>-Pedro
--------------------------------------------------------------------------------------------------

Dear Pedro,

                you are absolutely right!!!!

The problem was indeed that I was using TYPE_INT_ARGB
instead of TYPE_INT_RGB.when creating the BufferedImage
and the ImageComponent2D.

bufferedImage =
        // new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
        new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
buffer =
        // new ImageComponent2D(ImageComponent.FORMAT_RGBA, bufferedImage);
        new ImageComponent2D(ImageComponent.FORMAT_RGB, bufferedImage);

The quality of the snapshots is perfect now. Thank you so much!

My best regards
Petros


===========================================================
Petros Komodromos                             Home address:
Office: 1-245                 540 Memorial Drive, Apt#1407
Tel.: (617) 258-9468                  Cambridge, MA 02139
[EMAIL PROTECTED]              Tel.: (617) 577 -9869 / -5830
http://www.mit.edu/people/petros
Intelligent Engineering Systems Laboratory (IESL)
Massachusetts Institute of Technology
===========================================================

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