I am using an ImageComponent2D with byReference = true, yet it takes a
_long_ time to create the ImageComponent2D (on the order of 200ms).  My
assumption is that this means there is some copying or reformatting of data
going on.

We are trying to put live video on a texture or in a background:  we have a
custom Java3D renderer that puts every frame into a texture or background
image (similar to the one used to render a movie into a texture).  I
believe the problem is that the format of the buffered image (and image2d)
is different when coming from the capture card than the movie, so the
format of data we are feeding to the ImageComponent2D is different.

Is there any way to find out what image format, etc., we need to use on a
platform (PC or Unix) in order to guarantee that the creation of an
ImageComponent2D does not do any copying/reformatting of data internally
when the byReference flag is set?

Or, is there any way we can find out why that is so slow?

thanks.


--On Monday, March 5, 2001 11:33 AM -0800 Kelvin Chung
<[EMAIL PROTECTED]> wrote:

> Hi Justin,
>
>    My mistake in the last email. When byReference = true
> it should return the same reference, otherwise it is a bug.
>
> Thanks.
>
> - Kelvin
> -----------
> Java 3D Team
> Sun Microsystem Inc.
>
>> X-Unix-From: [EMAIL PROTECTED]  Mon Mar  5 11:20:51 2001
>> MIME-Version: 1.0
>> Content-MD5: A5XKFNd62H+rPXoJeRpWgw==
>> Date: Mon, 5 Mar 2001 11:18:14 -0800
>> From: Kelvin Chung <[EMAIL PROTECTED]>
>> Subject: Re: [JAVA3D] Raster img handling
>> Comments: To: [EMAIL PROTECTED]
>> To: [EMAIL PROTECTED]
>>
>> Hi Justin,
>>
>>
>> ImageComponent2D comp =
>>   new ImageComponent2D(ImageComponent.FORMAT_RGB, img);
>>
>> In current implementation,
>> comp.getImage() will not return the same img reference
>> when byReference = false.
>>
>> When byReference = true it may or may not give return
>> the same reference handle depending on whether the image
>> format support by underlying native library.
>>
>> - Kelvin
>> ---------
>> Java 3D Team
>> Sun Microsystems Inc.
>>
>>
>>> X-Unix-From: [EMAIL PROTECTED]  Fri Mar  2 22:20:45 2001
>>> X-Accept-Language: en
>>> MIME-Version: 1.0
>>> Content-Transfer-Encoding: 7bit
>>> Date: Sat, 3 Mar 2001 15:14:26 +1100
>>> From: Justin Couch <[EMAIL PROTECTED]>
>>> Subject: [JAVA3D] Raster img handling
>>> To: [EMAIL PROTECTED]
>>>
>>> If I create a new Raster image and pass it an image and
>>> imagecomponent2D, am I guaranteed that when I ask for them back that
>>> they will be exactly the same instance?
>>>
>>> BufferedImage img = new BufferedImage(rect.width,rect.height,
>>>                                      BufferedImage.TYPE_INT_RGB);
>>>
>>> ImageComponent2D comp =
>>>   new ImageComponent2D(ImageComponent.FORMAT_RGB, img);
>>>
>>> Raster ras = new Raster(new Point3f(-1.0f,-1.0f,-1.0f),
>>>                        Raster.RASTER_COLOR,
>>>                        0,
>>>                        0,
>>>                        rect.width,
>>>                        rect.height,
>>>                        comp,
>>>                        null);
>>>
>>> ImageComponent2D comp_2 = ras.getImage();
>>> BufferedImage img_2 = comp_2.getImage();
>>>
>>>
>>> Ie comp_2 == comp and img_2 == img are both true;
>>>
>>> --
>>> Justin Couch                                    Author, Java Hacker
>>> http://www.vlc.com.au/~justin/               Java 3D FAQ Maintainer
>>> http://www.j3d.org/              J3D.org The Java 3D Community Site
>>> -------------------------------------------------------------------
>>> "Humanism is dead. Animals think, feel; so do machines now.
>>> Neither man nor woman is the measure of all things. Every organism
>>> processes data according to its domain, its environment; you, with
>>> all your brains, would be useless in a mouse's universe..."
>>>                                              - Greg Bear, Slant
>>> -------------------------------------------------------------------
>>>
>>> =======================================================================
>>> ==== 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".
>
> =========================================================================
> == 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