|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.pdf.codec.BmpImage
public class BmpImage
Reads a BMP image. All types of BMP can be read.
It is based in the JAI codec.
Field Summary | |
---|---|
private int |
alphaMask
|
private static int |
BI_BITFIELDS
|
private static int |
BI_RGB
|
private static int |
BI_RLE4
|
private static int |
BI_RLE8
|
private long |
bitmapFileSize
|
private long |
bitmapOffset
|
private int |
bitsPerPixel
|
private int |
blueMask
|
private long |
compression
|
private int |
greenMask
|
(package private) int |
height
|
private long |
imageSize
|
private int |
imageType
|
private InputStream |
inputStream
|
private boolean |
isBottomUp
|
private static int |
LCS_CALIBRATED_RGB
|
private static int |
LCS_CMYK
|
private static int |
LCS_sRGB
|
private int |
numBands
|
private byte[] |
palette
|
HashMap |
properties
|
private int |
redMask
|
private static int |
VERSION_2_1_BIT
|
private static int |
VERSION_2_24_BIT
|
private static int |
VERSION_2_4_BIT
|
private static int |
VERSION_2_8_BIT
|
private static int |
VERSION_3_1_BIT
|
private static int |
VERSION_3_24_BIT
|
private static int |
VERSION_3_4_BIT
|
private static int |
VERSION_3_8_BIT
|
private static int |
VERSION_3_NT_16_BIT
|
private static int |
VERSION_3_NT_32_BIT
|
private static int |
VERSION_4_1_BIT
|
private static int |
VERSION_4_16_BIT
|
private static int |
VERSION_4_24_BIT
|
private static int |
VERSION_4_32_BIT
|
private static int |
VERSION_4_4_BIT
|
private static int |
VERSION_4_8_BIT
|
(package private) int |
width
|
private long |
xPelsPerMeter
|
private long |
yPelsPerMeter
|
Constructor Summary | |
---|---|
BmpImage(InputStream is,
boolean noHeader,
int size)
|
Method Summary | |
---|---|
private byte[] |
decodeRLE(boolean is8,
byte[] values)
|
private int |
findMask(int mask)
|
private int |
findShift(int mask)
|
private Image |
getImage()
|
static Image |
getImage(byte[] data)
Reads a BMP from a byte array. |
static Image |
getImage(InputStream is)
Reads a BMP from a stream. |
static Image |
getImage(InputStream is,
boolean noHeader,
int size)
Reads a BMP from a stream. |
static Image |
getImage(String file)
Reads a BMP from a file. |
static Image |
getImage(URL url)
Reads a BMP from an url. |
private byte[] |
getPalette(int group)
|
private Image |
indexedModel(byte[] bdata,
int bpc,
int paletteEntries)
|
protected void |
process(InputStream stream,
boolean noHeader)
|
private Image |
read1632Bit(boolean is32)
|
private Image |
read1Bit(int paletteEntries)
|
private void |
read24Bit(byte[] bdata)
|
private Image |
read4Bit(int paletteEntries)
|
private Image |
read8Bit(int paletteEntries)
|
private long |
readDWord(InputStream stream)
|
private int |
readInt(InputStream stream)
|
private int |
readLong(InputStream stream)
|
private void |
readPalette(int sizeOfPalette)
|
private Image |
readRLE4()
|
private Image |
readRLE8()
|
private int |
readShort(InputStream stream)
|
private int |
readUnsignedByte(InputStream stream)
|
private long |
readUnsignedInt(InputStream stream)
|
private int |
readUnsignedShort(InputStream stream)
|
private int |
readWord(InputStream stream)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private InputStream inputStream
private long bitmapFileSize
private long bitmapOffset
private long compression
private long imageSize
private byte[] palette
private int imageType
private int numBands
private boolean isBottomUp
private int bitsPerPixel
private int redMask
private int greenMask
private int blueMask
private int alphaMask
public HashMap properties
private long xPelsPerMeter
private long yPelsPerMeter
private static final int VERSION_2_1_BIT
private static final int VERSION_2_4_BIT
private static final int VERSION_2_8_BIT
private static final int VERSION_2_24_BIT
private static final int VERSION_3_1_BIT
private static final int VERSION_3_4_BIT
private static final int VERSION_3_8_BIT
private static final int VERSION_3_24_BIT
private static final int VERSION_3_NT_16_BIT
private static final int VERSION_3_NT_32_BIT
private static final int VERSION_4_1_BIT
private static final int VERSION_4_4_BIT
private static final int VERSION_4_8_BIT
private static final int VERSION_4_16_BIT
private static final int VERSION_4_24_BIT
private static final int VERSION_4_32_BIT
private static final int LCS_CALIBRATED_RGB
private static final int LCS_sRGB
private static final int LCS_CMYK
private static final int BI_RGB
private static final int BI_RLE8
private static final int BI_RLE4
private static final int BI_BITFIELDS
int width
int height
Constructor Detail |
---|
BmpImage(InputStream is, boolean noHeader, int size) throws IOException
IOException
Method Detail |
---|
public static Image getImage(URL url) throws IOException
url
- the url
IOException
- on errorpublic static Image getImage(InputStream is) throws IOException
is
- the stream
IOException
- on errorpublic static Image getImage(InputStream is, boolean noHeader, int size) throws IOException
is
- the streamnoHeader
- true to process a plain DIBsize
- the size of the DIB. Not used for a BMP
IOException
- on errorpublic static Image getImage(String file) throws IOException
file
- the file
IOException
- on errorpublic static Image getImage(byte[] data) throws IOException
data
- the byte array
IOException
- on errorprotected void process(InputStream stream, boolean noHeader) throws IOException
IOException
private byte[] getPalette(int group)
private Image getImage() throws IOException, BadElementException
IOException
BadElementException
private Image indexedModel(byte[] bdata, int bpc, int paletteEntries) throws BadElementException
BadElementException
private void readPalette(int sizeOfPalette) throws IOException
IOException
private Image read1Bit(int paletteEntries) throws IOException, BadElementException
IOException
BadElementException
private Image read4Bit(int paletteEntries) throws IOException, BadElementException
IOException
BadElementException
private Image read8Bit(int paletteEntries) throws IOException, BadElementException
IOException
BadElementException
private void read24Bit(byte[] bdata)
private int findMask(int mask)
private int findShift(int mask)
private Image read1632Bit(boolean is32) throws IOException, BadElementException
IOException
BadElementException
private Image readRLE8() throws IOException, BadElementException
IOException
BadElementException
private Image readRLE4() throws IOException, BadElementException
IOException
BadElementException
private byte[] decodeRLE(boolean is8, byte[] values)
private int readUnsignedByte(InputStream stream) throws IOException
IOException
private int readUnsignedShort(InputStream stream) throws IOException
IOException
private int readShort(InputStream stream) throws IOException
IOException
private int readWord(InputStream stream) throws IOException
IOException
private long readUnsignedInt(InputStream stream) throws IOException
IOException
private int readInt(InputStream stream) throws IOException
IOException
private long readDWord(InputStream stream) throws IOException
IOException
private int readLong(InputStream stream) throws IOException
IOException
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |