Class WBMPImageReader
java.lang.Object
javax.imageio.ImageReader
com.github.jaiimageio.impl.plugins.wbmp.WBMPImageReader
This class is the Java Image IO plugin reader for WBMP images.
It may subsample the image, clip the image,
and shift the decoded image origin if the proper decoding parameter
are set in the provided
WBMPImageReadParam.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIndicates whether the header is read.private intThe original image height.private ImageInputStreamThe input stream where reads fromprivate longThe stream position where the image data starts.private WBMPMetadataprivate intprivate intThe original image width.Fields inherited from class ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales -
Constructor Summary
ConstructorsConstructorDescriptionWBMPImageReader(ImageReaderSpi originator) ConstructsWBMPImageReaderfrom the providedImageReaderSpi. -
Method Summary
Modifier and TypeMethodDescriptionbooleanprivate voidcheckIndex(int imageIndex) intgetHeight(int imageIndex) getImageMetadata(int imageIndex) getImageTypes(int imageIndex) intgetNumImages(boolean allowSearch) Overrides the method defined in the superclass.intgetWidth(int imageIndex) booleanisRandomAccessEasy(int imageIndex) (package private) booleanisValidWbmpType(int type) read(int imageIndex, ImageReadParam param) voidreadRaster(int imageIndex, ImageReadParam param) voidreset()voidOverrides the method defined in the superclass.Methods inherited from class ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, checkReadParamBandSettings, clearAbortRequest, computeRegions, dispose, getAspectRatio, getAvailableLocales, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocale
-
Field Details
-
iis
The input stream where reads from -
gotHeader
private boolean gotHeaderIndicates whether the header is read. -
imageDataOffset
private long imageDataOffsetThe stream position where the image data starts. -
width
private int widthThe original image width. -
height
private int heightThe original image height. -
wbmpType
private int wbmpType -
metadata
-
-
Constructor Details
-
WBMPImageReader
ConstructsWBMPImageReaderfrom the providedImageReaderSpi.
-
-
Method Details
-
setInput
Overrides the method defined in the superclass.- Overrides:
setInputin classImageReader
-
getNumImages
Overrides the method defined in the superclass.- Specified by:
getNumImagesin classImageReader- Throws:
IOException
-
getWidth
- Specified by:
getWidthin classImageReader- Throws:
IOException
-
getHeight
- Specified by:
getHeightin classImageReader- Throws:
IOException
-
isRandomAccessEasy
- Overrides:
isRandomAccessEasyin classImageReader- Throws:
IOException
-
checkIndex
private void checkIndex(int imageIndex) -
readHeader
- Throws:
IOException
-
getImageTypes
- Specified by:
getImageTypesin classImageReader- Throws:
IOException
-
getDefaultReadParam
- Overrides:
getDefaultReadParamin classImageReader
-
getImageMetadata
- Specified by:
getImageMetadatain classImageReader- Throws:
IOException
-
getStreamMetadata
- Specified by:
getStreamMetadatain classImageReader- Throws:
IOException
-
read
- Specified by:
readin classImageReader- Throws:
IOException
-
canReadRaster
public boolean canReadRaster()- Overrides:
canReadRasterin classImageReader
-
readRaster
- Overrides:
readRasterin classImageReader- Throws:
IOException
-
reset
public void reset()- Overrides:
resetin classImageReader
-
isValidWbmpType
boolean isValidWbmpType(int type)
-