Class BMPImageReader
java.lang.Object
javax.imageio.ImageReader
com.twelvemonkeys.imageio.ImageReaderBase
com.twelvemonkeys.imageio.plugins.bmp.BMPImageReader
ImageReader for Microsoft Windows Bitmap (BMP) format.
- Version:
- $Id: BMPImageReader.java,v 1.0 Apr 20, 2009 11:54:28 AM haraldk Exp$
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IndexColorModel
private int[]
private DIBHeader
private ImageReader
private long
private ImageReader
Fields inherited from class com.twelvemonkeys.imageio.ImageReaderBase
imageInput
Fields inherited from class javax.imageio.ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Raster
clipRowToRect
(Raster raster, Rectangle rect, int[] bands, int xSub) private WritableRaster
clipToRect
(WritableRaster raster, Rectangle rect, int[] bands) private int[]
createOffsets
(int numBands) int
getHeight
(int imageIndex) getImageMetadata
(int imageIndex) Default implementation that always returnsnull
.private ImageReader
getImageReaderDelegate
(int compression) getImageTypes
(int imageIndex) int
getNumImages
(boolean allowSearch) Default implementation that always returns1
.getRawImageType
(int imageIndex) int
getWidth
(int imageIndex) private ImageReader
initReaderDelegate
(int compression) static void
read
(int imageIndex, ImageReadParam param) private IndexColorModel
private static void
private static void
private void
private void
readRowByte
(DataInput input, int height, Rectangle srcRegion, int xSub, int ySub, int bitsPerSample, int samplesPerPixel, byte[] rowDataByte, WritableRaster destChannel, Raster srcChannel, int y) private void
readRowInt
(DataInput input, int height, Rectangle srcRegion, int xSub, int ySub, int[] rowDataInt, WritableRaster destChannel, Raster srcChannel, int y) private void
readRowUShort
(DataInput input, int height, Rectangle srcRegion, int xSub, int ySub, short[] rowDataUShort, WritableRaster destChannel, Raster srcChannel, int y) private BufferedImage
readUsingDelegate
(int compression, ImageReadParam param) protected void
Resets all member variables.(package private) static <T extends Throwable>
voidMethods inherited from class com.twelvemonkeys.imageio.ImageReaderBase
assertInput, checkBounds, dispose, fakeAOI, fakeSubsampling, getDestination, getStreamMetadata, hasExplicitDestination, reset, setInput, showIt
Methods inherited from class javax.imageio.ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getDefaultReadParam, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isRandomAccessEasy, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readRaster, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocale
-
Field Details
-
pixelOffset
private long pixelOffset -
header
-
colors
private int[] colors -
colorMap
-
jpegReaderDelegate
-
pngReaderDelegate
-
-
Constructor Details
-
BMPImageReader
public BMPImageReader() -
BMPImageReader
BMPImageReader(ImageReaderSpi provider)
-
-
Method Details
-
resetMembers
protected void resetMembers()Description copied from class:ImageReaderBase
Resets all member variables. This method is by default invoked from:- Specified by:
resetMembers
in classImageReaderBase
-
getNumImages
Description copied from class:ImageReaderBase
Default implementation that always returns1
.- Overrides:
getNumImages
in classImageReaderBase
- Parameters:
allowSearch
- ignored, unless overridden- Returns:
1
, unless overridden- Throws:
IOException
- never, unless overridden
-
readHeader
- Throws:
IOException
-
readColorMap
- Throws:
IOException
-
getWidth
- Specified by:
getWidth
in classImageReader
- Throws:
IOException
-
getHeight
- Specified by:
getHeight
in classImageReader
- Throws:
IOException
-
getImageTypes
- Specified by:
getImageTypes
in classImageReader
- Throws:
IOException
-
getRawImageType
- Overrides:
getRawImageType
in classImageReader
- Throws:
IOException
-
read
- Specified by:
read
in classImageReader
- Throws:
IOException
-
readUsingDelegate
- Throws:
IOException
-
initReaderDelegate
- Throws:
IOException
-
getImageReaderDelegate
- Throws:
IIOException
-
createOffsets
private int[] createOffsets(int numBands) -
readRowByte
private void readRowByte(DataInput input, int height, Rectangle srcRegion, int xSub, int ySub, int bitsPerSample, int samplesPerPixel, byte[] rowDataByte, WritableRaster destChannel, Raster srcChannel, int y) throws IOException - Throws:
IOException
-
readRowUShort
private void readRowUShort(DataInput input, int height, Rectangle srcRegion, int xSub, int ySub, short[] rowDataUShort, WritableRaster destChannel, Raster srcChannel, int y) throws IOException - Throws:
IOException
-
readRowInt
private void readRowInt(DataInput input, int height, Rectangle srcRegion, int xSub, int ySub, int[] rowDataInt, WritableRaster destChannel, Raster srcChannel, int y) throws IOException - Throws:
IOException
-
readFully
- Throws:
IOException
-
readFully
- Throws:
IOException
-
clipRowToRect
-
clipToRect
-
getImageMetadata
Description copied from class:ImageReaderBase
Default implementation that always returnsnull
.- Overrides:
getImageMetadata
in classImageReaderBase
- Parameters:
imageIndex
- ignored, unless overridden- Returns:
null
, unless overridden- Throws:
IOException
- never, unless overridden.
-
main
-
throwAs
- Throws:
T
-