net.rim.device.api.system
Class Bitmap.PNGInfo

java.lang.Object
  |
  +--net.rim.device.api.system.Bitmap.PNGInfo
Enclosing class:
Bitmap

public static final class Bitmap.PNGInfo
extends Object

Provides additional information relevant for PNG bitmap graphics.

For details on color and bit depth information and PNG graphics, see the relevant standards documentation (RFC 2083).


Field Summary
 boolean alpha
          Indicates whether this PNG has alpha information.
 int alpha_bit_depth
          Indicates the bit depth of the alpha channel.
 byte bit_depth
          The bit depth of the PNG.
 byte color_type
          The color type of the PNG.
 short height
          The height of the PNG in pixels.
 boolean transparency
          Indicates whether this PNG has transparency information.
 short width
          The width of the PNG in pixels.
 
Constructor Summary
Bitmap.PNGInfo()
          Constructs a new PNGInfo instance.
 
Method Summary
 void getPNGInfo(byte[] png, int offset, int length)
          Retrieves a PNG bitmap's information.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alpha

public boolean alpha
Indicates whether this PNG has alpha information.

Note: If this member is true then transparency will also be true.


alpha_bit_depth

public int alpha_bit_depth
Indicates the bit depth of the alpha channel.
Since:
JDE 3.6.0

bit_depth

public byte bit_depth
The bit depth of the PNG.

color_type

public byte color_type
The color type of the PNG.

height

public short height
The height of the PNG in pixels.

transparency

public boolean transparency
Indicates whether this PNG has transparency information.

Note: If the alpha member is true, then this member will also be true.


width

public short width
The width of the PNG in pixels.
Constructor Detail

Bitmap.PNGInfo

public Bitmap.PNGInfo()
Constructs a new PNGInfo instance.

Method Detail

getPNGInfo

public void getPNGInfo(byte[] png,
                       int offset,
                       int length)
Retrieves a PNG bitmap's information.

Parameters:
png - PNG data to probe.
offset - Start of PNG data in the passed byte array.
length - Length of PNG data in the passed byte array: -1 means to the end of the data array.
Throws:
NullPointerException - Thrown if the png parameter is null.
IllegalArgumentException - Thrown if the png parameter's data is invalid, or offset or length are invalid.



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.