> MIME-Version: 1.0
> Date: Fri, 22 Sep 2000 09:46:30 -0400
> From: "J. Lee Dixon" <[EMAIL PROTECTED]>
> Subject: [JAVA2D] Image format
> To: [EMAIL PROTECTED]
>
> Is there ANY way to load an image (from a URL from example), and know
> whether the source image file has an alpha channel or not.

You can get the ImageProducer from the image (getSource()) and then
attach an ImageConsumer to it and look at the ColorModel/pixels
when setPixels() are called.  There is no API that will give you this
information from a java.awt.Image.

jeannette

>
> It looks to me like the only thing in Java you can do is to force
> whether or not you want an alpha channel.
>
> Am I missing something, or is Java missing something very fundamental??
>
> The application for this is Java3D, where each "image observer" (a 3D
> polygon) must be placed in a special mode to perform alpha blending.
> Rendering is much slower if you enable alpha blending just by default.
> Instead, blending should only be turned on when necessary.
>
> The "Image" class gives width and height, no depth.  With the
> "BufferedImage" class, you dictate the format.  Is there another class I
> am missing.
>
> -Lee
>
> J. Lee Dixon
> Software Engineer
> SAIC - Celebration, FL
> [EMAIL PROTECTED]
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA2D-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 JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to