|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.image4j.codec.bmp.BMPDecoder
public class BMPDecoder
Decodes images in BMP format.
| Constructor Summary | |
|---|---|
BMPDecoder(java.io.InputStream in)
Creates a new instance of BMPDecoder and reads the BMP data from the source. |
|
| Method Summary | |
|---|---|
java.awt.image.BufferedImage |
getBufferedImage()
The decoded image read from the source input. |
InfoHeader |
getInfoHeader()
The InfoHeader structure, which provides information about the BMP data. |
static java.awt.image.BufferedImage |
read(java.io.File file)
Reads and decodes BMP data from the source file. |
static java.awt.image.BufferedImage |
read(InfoHeader infoHeader,
LittleEndianInputStream lis)
Reads the BMP data from the given InputStream using the information contained in the InfoHeader. |
static java.awt.image.BufferedImage |
read(InfoHeader infoHeader,
LittleEndianInputStream lis,
ColorEntry[] colorTable)
Reads the BMP data from the given InputStream using the information contained in the InfoHeader. |
static java.awt.image.BufferedImage |
read(java.io.InputStream in)
Reads and decodes BMP data from the source input. |
static java.awt.image.BufferedImage |
read1(InfoHeader infoHeader,
LittleEndianInputStream lis,
ColorEntry[] colorTable)
Reads 1-bit uncompressed bitmap raster data, which may be monochrome depending on the palette entries in colorTable. |
static java.awt.image.BufferedImage |
read24(InfoHeader infoHeader,
LittleEndianInputStream lis)
Reads 24-bit uncompressed bitmap raster data. |
static java.awt.image.BufferedImage |
read32(InfoHeader infoHeader,
LittleEndianInputStream lis)
Reads 32-bit uncompressed bitmap raster data, with transparency. |
static java.awt.image.BufferedImage |
read4(InfoHeader infoHeader,
LittleEndianInputStream lis,
ColorEntry[] colorTable)
Reads 4-bit uncompressed bitmap raster data, which is interpreted based on the colours specified in the palette. |
static java.awt.image.BufferedImage |
read8(InfoHeader infoHeader,
LittleEndianInputStream lis,
ColorEntry[] colorTable)
Reads 8-bit uncompressed bitmap raster data, which is interpreted based on the colours specified in the palette. |
static ColorEntry[] |
readColorTable(InfoHeader infoHeader,
LittleEndianInputStream lis)
Reads the ColorEntry table from the given InputStream using the information contained in the given infoHeader. |
static BMPImage |
readExt(java.io.File file)
Reads and decodes BMP data from the source file, together with metadata. |
static BMPImage |
readExt(java.io.InputStream in)
Reads and decodes BMP data from the source input, together with metadata. |
static InfoHeader |
readInfoHeader(LittleEndianInputStream lis)
Reads the BMP info header structure from the given InputStream. |
static InfoHeader |
readInfoHeader(LittleEndianInputStream lis,
int infoSize)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BMPDecoder(java.io.InputStream in)
throws java.io.IOException
in - the source InputStream from which to read the BMP data
java.io.IOException - if an error occurs| Method Detail |
|---|
public InfoHeader getInfoHeader()
public java.awt.image.BufferedImage getBufferedImage()
public static InfoHeader readInfoHeader(LittleEndianInputStream lis)
throws java.io.IOException
lis - the InputStream to read
java.io.IOException - if an error occurred
public static InfoHeader readInfoHeader(LittleEndianInputStream lis,
int infoSize)
throws java.io.IOException
java.io.IOException
public static java.awt.image.BufferedImage read(InfoHeader infoHeader,
LittleEndianInputStream lis)
throws java.io.IOException
lis - the source inputinfoHeader - an InfoHeader that was read by a call to
readInfoHeader().
java.io.IOException - if an error occurs
public static java.awt.image.BufferedImage read(InfoHeader infoHeader,
LittleEndianInputStream lis,
ColorEntry[] colorTable)
throws java.io.IOException
colorTable - ColorEntry array containing paletteinfoHeader - an InfoHeader that was read by a call to
readInfoHeader().lis - the source input
java.io.IOException - if any error occurs
public static ColorEntry[] readColorTable(InfoHeader infoHeader,
LittleEndianInputStream lis)
throws java.io.IOException
infoHeader - the InfoHeader structure, which was read using
readInfoHeader()lis - the InputStream to read
java.io.IOException - if an error occurs
public static java.awt.image.BufferedImage read1(InfoHeader infoHeader,
LittleEndianInputStream lis,
ColorEntry[] colorTable)
throws java.io.IOException
infoHeader - the InfoHeader structure, which was read using
readInfoHeader()lis - the source inputcolorTable - ColorEntry array specifying the palette, which
must not be null.
java.io.IOException - if an error occurs
public static java.awt.image.BufferedImage read4(InfoHeader infoHeader,
LittleEndianInputStream lis,
ColorEntry[] colorTable)
throws java.io.IOException
infoHeader - the InfoHeader structure, which was read using
readInfoHeader()lis - the source inputcolorTable - ColorEntry array specifying the palette, which
must not be null.
java.io.IOException - if an error occurs
public static java.awt.image.BufferedImage read8(InfoHeader infoHeader,
LittleEndianInputStream lis,
ColorEntry[] colorTable)
throws java.io.IOException
infoHeader - the InfoHeader structure, which was read using
readInfoHeader()lis - the source inputcolorTable - ColorEntry array specifying the palette, which
must not be null.
java.io.IOException - if an error occurs
public static java.awt.image.BufferedImage read24(InfoHeader infoHeader,
LittleEndianInputStream lis)
throws java.io.IOException
lis - the source inputinfoHeader - the InfoHeader structure, which was read using
readInfoHeader()
java.io.IOException - if an error occurs
public static java.awt.image.BufferedImage read32(InfoHeader infoHeader,
LittleEndianInputStream lis)
throws java.io.IOException
lis - the source inputinfoHeader - the InfoHeader structure, which was read using
readInfoHeader()
java.io.IOException - if an error occurs
public static java.awt.image.BufferedImage read(java.io.File file)
throws java.io.IOException
file - the source file
java.io.IOException - if an error occurs
public static java.awt.image.BufferedImage read(java.io.InputStream in)
throws java.io.IOException
in - the source input
java.io.IOException - if an error occurs
public static BMPImage readExt(java.io.File file)
throws java.io.IOException
file - the source file
java.io.IOException - if an error occurs
public static BMPImage readExt(java.io.InputStream in)
throws java.io.IOException
in - the source input
java.io.IOException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||