Class DIBHeader
- java.lang.Object
-
- com.twelvemonkeys.imageio.plugins.bmp.DIBHeader
-
- Direct Known Subclasses:
DIBHeader.BitmapCoreHeader
,DIBHeader.BitmapCoreHeaderV2
,DIBHeader.BitmapInfoHeader
,DIBHeader.BitmapV4InfoHeader
,DIBHeader.BitmapV5InfoHeader
abstract class DIBHeader extends java.lang.Object
Represents the DIB (Device Independent Bitmap) Information header structure.- Version:
- $Id: DIBHeader.java,v 1.0 May 5, 2009 10:45:31 AM haraldk Exp$
- See Also:
- BMP file format (Wikipedia)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
DIBHeader.BitmapCoreHeader
(package private) static class
DIBHeader.BitmapCoreHeaderV2
OS/2 BitmapCoreHeader Version 2.(package private) static class
DIBHeader.BitmapInfoHeader
Represents the DIB (Device Independent Bitmap) Windows 3.0 Bitmap Information header structure.(package private) static class
DIBHeader.BitmapV4InfoHeader
Represents the BITMAPV4INFOHEADER structure.(package private) static class
DIBHeader.BitmapV5InfoHeader
Represents the BITMAPV5INFOHEADER structure.
-
Field Summary
Fields Modifier and Type Field Description protected int
bitCount
protected double[]
cieXYZEndpoints
protected int
colorsImportant
protected int
colorSpaceType
protected int
colorsUsed
protected int
compression
0 = BI_RGB: No compression 1 = BI_RLE8: 8 bit RLE Compression (8 bit only) 2 = BI_RLE4: 4 bit RLE Compression (4 bit only) 3 = BI_BITFIELDS: No compression (16 & 32 bit only)private int
DEFAULT_PIXELS_PER_METER
protected int[]
gamma
protected int
height
protected int
imageSize
protected int
intent
protected int[]
masks
protected int
planes
protected long
profileData
protected long
profileSize
protected int
size
protected boolean
topDown
protected int
width
protected int
xPixelsPerMeter
protected int
yPixelsPerMeter
-
Constructor Summary
Constructors Modifier Constructor Description protected
DIBHeader()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private static DIBHeader
createHeader(int size)
int
getBitCount()
protected abstract java.lang.String
getBMPVersion()
int
getColorsImportant()
int
getColorsUsed()
int
getCompression()
int
getHeight()
int
getImageSize()
int
getPlanes()
int
getSize()
int
getWidth()
int
getXPixelsPerMeter()
int
getYPixelsPerMeter()
boolean
hasMasks()
protected abstract void
read(int size, java.io.DataInput stream)
static DIBHeader
read(java.io.DataInput stream)
private static int[]
readMasks(java.io.DataInput stream, boolean hasAlphaMask)
java.lang.String
toString()
protected abstract void
write(java.io.DataOutput stream)
-
-
-
Field Detail
-
DEFAULT_PIXELS_PER_METER
private final int DEFAULT_PIXELS_PER_METER
- See Also:
- Constant Field Values
-
size
protected int size
-
width
protected int width
-
height
protected int height
-
topDown
protected boolean topDown
-
planes
protected int planes
-
bitCount
protected int bitCount
-
compression
protected int compression
0 = BI_RGB: No compression 1 = BI_RLE8: 8 bit RLE Compression (8 bit only) 2 = BI_RLE4: 4 bit RLE Compression (4 bit only) 3 = BI_BITFIELDS: No compression (16 & 32 bit only)
-
imageSize
protected int imageSize
-
xPixelsPerMeter
protected int xPixelsPerMeter
-
yPixelsPerMeter
protected int yPixelsPerMeter
-
colorsUsed
protected int colorsUsed
-
colorsImportant
protected int colorsImportant
-
masks
protected int[] masks
-
colorSpaceType
protected int colorSpaceType
-
cieXYZEndpoints
protected double[] cieXYZEndpoints
-
gamma
protected int[] gamma
-
intent
protected int intent
-
profileData
protected long profileData
-
profileSize
protected long profileSize
-
-
Method Detail
-
read
public static DIBHeader read(java.io.DataInput stream) throws java.io.IOException
- Throws:
java.io.IOException
-
createHeader
private static DIBHeader createHeader(int size) throws java.io.IOException
- Throws:
java.io.IOException
-
read
protected abstract void read(int size, java.io.DataInput stream) throws java.io.IOException
- Throws:
java.io.IOException
-
write
protected abstract void write(java.io.DataOutput stream) throws java.io.IOException
- Throws:
java.io.IOException
-
getSize
public final int getSize()
-
getWidth
public final int getWidth()
-
getHeight
public final int getHeight()
-
getPlanes
public final int getPlanes()
-
getBitCount
public final int getBitCount()
-
getCompression
public int getCompression()
-
getImageSize
public int getImageSize()
-
getXPixelsPerMeter
public int getXPixelsPerMeter()
-
getYPixelsPerMeter
public int getYPixelsPerMeter()
-
getColorsUsed
public int getColorsUsed()
-
getColorsImportant
public int getColorsImportant()
-
hasMasks
public boolean hasMasks()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
readMasks
private static int[] readMasks(java.io.DataInput stream, boolean hasAlphaMask) throws java.io.IOException
- Throws:
java.io.IOException
-
getBMPVersion
protected abstract java.lang.String getBMPVersion()
-
-