net.rim.device.api.system
Class PNGEncodedImage

java.lang.Object
  |
  +--net.rim.device.api.system.EncodedImage
        |
        +--net.rim.device.api.system.PNGEncodedImage

public final class PNGEncodedImage
extends EncodedImage

Represents an image encoded in the PNG format.


Fields inherited from class net.rim.device.api.system.EncodedImage
DECODE_ALPHA, DECODE_NATIVE, DECODE_READONLY, IMAGE_TYPE_JPEG, IMAGE_TYPE_PNG, IMAGE_TYPE_WBMP
 
Method Summary
 int getAlphaBitDepth()
          Queries the bit depth of the alpha channel.
 int getBitDepth()
          Queries the PNG bit depth.
 Bitmap getBitmap(int frameIndex)
          Returns a bitmap of the PNG image.
 int getColorType()
          Queries the PNG color type.
 boolean hasAlpha()
          Queries whether the PNG has an alpha channel.
 
Methods inherited from class net.rim.device.api.system.EncodedImage
createEncodedImage, createEncodedImage, getBitmap, getFrameCount, getFrameHeight, getFrameMonochrome, getFrameTransparency, getFrameWidth, getHeight, getImageType, getSupportedMIMETypes, getWidth, hasTransparency, isMonochrome, setDecodeMode, setScale
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getColorType

public int getColorType()
Queries the PNG color type.
Returns:
The PNG color type of the image.

getBitDepth

public int getBitDepth()
Queries the PNG bit depth.
Returns:
The PNG bit depth of the image.

hasAlpha

public boolean hasAlpha()
Queries whether the PNG has an alpha channel.
Returns:
True if the PNG has an alpha channel, false otherwise.

getAlphaBitDepth

public int getAlphaBitDepth()
Queries the bit depth of the alpha channel.
Returns:
The bit depth of the alpha channel, 0 if the image does not have an alpha channel.

getBitmap

public Bitmap getBitmap(int frameIndex)
Returns a bitmap of the PNG image. PNG images always contain a single frame.
Overrides:
getBitmap in class EncodedImage
Parameters:
frameIndex - Must be 0.
Returns:
A Bitmap decoded from the PNG data.
Since:
JDE 3.6


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