|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.pearsoneduc.ip.io.PNGDecoder
Reads image data in the PNG format from a stream or a file.
This class is merely a wrapper for PNGDataDecoder from
the com.visualtek.PNG
package.
PNGDecoderException
,
BufferedImage
Constructor Summary | |
PNGDecoder()
Constructs a PNGDecoder associated with standard input. |
|
PNGDecoder(java.io.InputStream in)
Constructs a PNGDecoder that reads from an existing InputStream. |
|
PNGDecoder(java.lang.String imgfile)
Constructs a PNGDecoder that reads from a named file. |
Method Summary | |
java.awt.image.BufferedImage |
decodeAsBufferedImage()
Decodes the input data and creates an image. |
int |
getBitDepth()
|
int |
getHeight()
|
int |
getNumPixels()
|
int |
getRowSize()
|
int |
getType()
Indicates what type of image is available for decoding. |
int |
getWidth()
|
boolean |
hasPalette()
Indicates whether indexed colour image data are available for decoding. |
boolean |
isBinary()
Indicates whether binary image data are available for decoding. |
boolean |
isGrey()
Indicates whether greyscale image data are available for decoding. |
boolean |
isRGB()
Indicates whether RGB image data are available for decoding. |
byte[] |
readRow(byte[] row)
Reads a row of image data. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public PNGDecoder() throws java.io.IOException, PNGDecoderException
public PNGDecoder(java.io.InputStream in) throws java.io.IOException, PNGDecoderException
in
- InputStream representing the source of image datapublic PNGDecoder(java.lang.String imgfile) throws java.io.IOException, PNGDecoderException
imgfile
- name of the file containing the image dataMethod Detail |
public int getType()
PPMConstants
public boolean isBinary()
public boolean isGrey()
public boolean hasPalette()
public boolean isRGB()
public int getWidth()
public int getHeight()
public int getNumPixels()
public int getBitDepth()
public int getRowSize()
public byte[] readRow(byte[] row) throws java.io.IOException, PNGDecoderException
row
- byte array in which image data will be placed, or nullpublic java.awt.image.BufferedImage decodeAsBufferedImage() throws java.io.IOException, PNGDecoderException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |