Package com.itextpdf.io.image
Class BmpImageHelper
java.lang.Object
com.itextpdf.io.image.BmpImageHelper
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static byte[]
decodeRLE
(boolean is8, byte[] values, BmpImageHelper.BmpParameters bmp) private static int
findMask
(int mask) private static int
findShift
(int mask) private static boolean
private static byte[]
getPalette
(int group, BmpImageHelper.BmpParameters bmp) private static void
indexedModel
(byte[] bdata, int bpc, int paletteEntries, BmpImageHelper.BmpParameters bmp) private static void
process
(BmpImageHelper.BmpParameters bmp, InputStream stream) static void
processImage
(ImageData image) Process the passed Image data as a BMP image.private static void
read1632Bit
(boolean is32, BmpImageHelper.BmpParameters bmp) private static void
read1Bit
(int paletteEntries, BmpImageHelper.BmpParameters bmp) private static void
read24Bit
(byte[] bdata, BmpImageHelper.BmpParameters bmp) private static void
read4Bit
(int paletteEntries, BmpImageHelper.BmpParameters bmp) private static void
read8Bit
(int paletteEntries, BmpImageHelper.BmpParameters bmp) private static long
readDWord
(InputStream stream) private static int
readInt
(InputStream stream) private static int
readLong
(InputStream stream) private static void
readPalette
(int sizeOfPalette, BmpImageHelper.BmpParameters bmp) private static void
private static void
private static int
readShort
(InputStream stream) private static int
readUnsignedByte
(InputStream stream) private static long
readUnsignedInt
(InputStream stream) private static int
readUnsignedShort
(InputStream stream) private static int
readWord
(InputStream stream)
-
Field Details
-
VERSION_2_1_BIT
private static final int VERSION_2_1_BIT- See Also:
-
VERSION_2_4_BIT
private static final int VERSION_2_4_BIT- See Also:
-
VERSION_2_8_BIT
private static final int VERSION_2_8_BIT- See Also:
-
VERSION_2_24_BIT
private static final int VERSION_2_24_BIT- See Also:
-
VERSION_3_1_BIT
private static final int VERSION_3_1_BIT- See Also:
-
VERSION_3_4_BIT
private static final int VERSION_3_4_BIT- See Also:
-
VERSION_3_8_BIT
private static final int VERSION_3_8_BIT- See Also:
-
VERSION_3_24_BIT
private static final int VERSION_3_24_BIT- See Also:
-
VERSION_3_NT_16_BIT
private static final int VERSION_3_NT_16_BIT- See Also:
-
VERSION_3_NT_32_BIT
private static final int VERSION_3_NT_32_BIT- See Also:
-
VERSION_4_1_BIT
private static final int VERSION_4_1_BIT- See Also:
-
VERSION_4_4_BIT
private static final int VERSION_4_4_BIT- See Also:
-
VERSION_4_8_BIT
private static final int VERSION_4_8_BIT- See Also:
-
VERSION_4_16_BIT
private static final int VERSION_4_16_BIT- See Also:
-
VERSION_4_24_BIT
private static final int VERSION_4_24_BIT- See Also:
-
VERSION_4_32_BIT
private static final int VERSION_4_32_BIT- See Also:
-
LCS_CALIBRATED_RGB
private static final int LCS_CALIBRATED_RGB- See Also:
-
LCS_SRGB
private static final int LCS_SRGB- See Also:
-
LCS_CMYK
private static final int LCS_CMYK- See Also:
-
BI_RGB
private static final int BI_RGB- See Also:
-
BI_RLE8
private static final int BI_RLE8- See Also:
-
BI_RLE4
private static final int BI_RLE4- See Also:
-
BI_BITFIELDS
private static final int BI_BITFIELDS- See Also:
-
-
Constructor Details
-
BmpImageHelper
BmpImageHelper()
-
-
Method Details
-
processImage
Process the passed Image data as a BMP image. Image is loaded and all image attributes are initialized and/or updated- Parameters:
image
- the image to process as a BMP image
-
process
private static void process(BmpImageHelper.BmpParameters bmp, InputStream stream) throws IOException - Throws:
IOException
-
getPalette
-
getImage
- Throws:
IOException
-
indexedModel
private static void indexedModel(byte[] bdata, int bpc, int paletteEntries, BmpImageHelper.BmpParameters bmp) -
readPalette
private static void readPalette(int sizeOfPalette, BmpImageHelper.BmpParameters bmp) throws IOException - Throws:
IOException
-
read1Bit
private static void read1Bit(int paletteEntries, BmpImageHelper.BmpParameters bmp) throws IOException - Throws:
IOException
-
read4Bit
private static void read4Bit(int paletteEntries, BmpImageHelper.BmpParameters bmp) throws IOException - Throws:
IOException
-
read8Bit
private static void read8Bit(int paletteEntries, BmpImageHelper.BmpParameters bmp) throws IOException - Throws:
IOException
-
read24Bit
- Throws:
IOException
-
findMask
private static int findMask(int mask) -
findShift
private static int findShift(int mask) -
read1632Bit
- Throws:
IOException
-
readRLE8
- Throws:
IOException
-
readRLE4
- Throws:
IOException
-
decodeRLE
-
readUnsignedByte
- Throws:
IOException
-
readUnsignedShort
- Throws:
IOException
-
readShort
- Throws:
IOException
-
readWord
- Throws:
IOException
-
readUnsignedInt
- Throws:
IOException
-
readInt
- Throws:
IOException
-
readDWord
- Throws:
IOException
-
readLong
- Throws:
IOException
-