Hi David,

  you can use
    BufferedImage bi = ...;
    ColorModel cm = bi.getColorModel();
    int bpp = cm.getPixelSize();

  Thank you,
    Dmitri

On Thu, Oct 21, 2004 at 05:39:47PM +0100, Rosenstrauch, David wrote:
 > Is there a way to query the color depth (bits per pixel) from a BufferedImage?
 >
 > I found a 3rd party helper class to do this
 > (http://www.geocities.com/marcoschmidt.geo/image-info.html), but I was hoping
 > there was something built into the JDK that I could use.
 >
 > TIA,
 >
 > DR
 >
 >
 > ==============================================================================
 > This message is for the sole use of the intended recipient. If you received
 > this message in error please delete it and notify us. If this message was
 > misdirected, CSFB does not waive any confidentiality or privilege. CSFB
 > retains and monitors electronic communications sent through its network.
 > Instructions transmitted over this system are not binding on CSFB until they
 > are confirmed by us. Message transmission is not guaranteed to be secure.
 > ==============================================================================
 >
 > ===========================================================================
 > 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