I have a server app that uses Canvas3D in offscreen mode.  After
receiving a request, the app gets the Canvas3D to render into a
BufferedImage, then uses JAI to encode the image to JPEG.

I've been getting some odd performance stats out of this app, and have
been trying to tune it by choosing different kinds of BufferedImage.

As far as I can tell, if I use TYPE_3BYTE_BGR or TYPE_4BYTE_ABGR
BufferedImage type for the Java3D offscreen rendering, I get a better
performing Java3D render, compared with using something like TYPE_INT_RGB.

But the problem seems to be that by using xxxBGR format BufferedImage,
then the JPEG encoding becomes slower.

According to the JAI folks, "you might want to try a component image
with bands ordered as RGB".  And, indeed, use of TYPE_INT_RGB does seem
to yield better performance for JPEG encoding, but, consequentially, the
Java3D rendering seems much slower.

Has anyone tried to figure out a "best choice" of BufferedImage type,
that works fastest for both the Java3D rendering, and the JPEG encoding?

I've been doing my testing using jdk 1.5, jai 1.1.2_01 and Java3D 1.3.2,
on Fedora Core 3 Linux intel, Solaris 10 sparc, and Windows XP intel.
The results for both WIndows and Solaris seem to be similar, but Linux
seems to be different from them, so maybe I have to choose a different
combo for Linux?

-- Russell

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