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.ObjectRepresents 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 classDIBHeader.BitmapCoreHeader(package private) static classDIBHeader.BitmapCoreHeaderV2OS/2 BitmapCoreHeader Version 2.(package private) static classDIBHeader.BitmapInfoHeaderRepresents the DIB (Device Independent Bitmap) Windows 3.0 Bitmap Information header structure.(package private) static classDIBHeader.BitmapV4InfoHeaderRepresents the BITMAPV4INFOHEADER structure.(package private) static classDIBHeader.BitmapV5InfoHeaderRepresents the BITMAPV5INFOHEADER structure.
-
Field Summary
Fields Modifier and Type Field Description protected intbitCountprotected double[]cieXYZEndpointsprotected intcolorsImportantprotected intcolorSpaceTypeprotected intcolorsUsedprotected intcompression0 = 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 intDEFAULT_PIXELS_PER_METERprotected int[]gammaprotected intheightprotected intimageSizeprotected intintentprotected int[]masksprotected intplanesprotected longprofileDataprotected longprofileSizeprotected intsizeprotected booleantopDownprotected intwidthprotected intxPixelsPerMeterprotected intyPixelsPerMeter
-
Constructor Summary
Constructors Modifier Constructor Description protectedDIBHeader()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private static DIBHeadercreateHeader(int size)intgetBitCount()protected abstract java.lang.StringgetBMPVersion()intgetColorsImportant()intgetColorsUsed()intgetCompression()intgetHeight()intgetImageSize()intgetPlanes()intgetSize()intgetWidth()intgetXPixelsPerMeter()intgetYPixelsPerMeter()booleanhasMasks()protected abstract voidread(int size, java.io.DataInput stream)static DIBHeaderread(java.io.DataInput stream)private static int[]readMasks(java.io.DataInput stream, boolean hasAlphaMask)java.lang.StringtoString()protected abstract voidwrite(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:
toStringin 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()
-
-