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

java.lang.Object
  extended by 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

width

public short width
The width of the PNG in pixels.


height

public short height
The height of the PNG in pixels.


color_type

public byte color_type
The color type of the PNG.


bit_depth

public byte bit_depth
The bit depth of the PNG.


transparency

public boolean transparency
Indicates whether this PNG has transparency information.

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


alpha

public boolean alpha
Indicates whether this PNG has alpha information.

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


alpha_bit_depth

public int alpha_bit_depth
Indicates the bit depth of the alpha channel.

Since:
BlackBerry API 3.6.0


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-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal