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 boolean
Indicates whether the header is read.private int
The original image height.private ImageInputStream
The input stream where reads fromprivate long
The stream position where the image data starts.private WBMPMetadata
private int
private int
The original image width.Fields inherited from class javax.imageio.ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
-
Constructor Summary
ConstructorsConstructorDescriptionWBMPImageReader
(ImageReaderSpi originator) ConstructsWBMPImageReader
from the providedImageReaderSpi
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
private void
checkIndex
(int imageIndex) int
getHeight
(int imageIndex) getImageMetadata
(int imageIndex) getImageTypes
(int imageIndex) int
getNumImages
(boolean allowSearch) Overrides the method defined in the superclass.int
getWidth
(int imageIndex) boolean
isRandomAccessEasy
(int imageIndex) (package private) boolean
isValidWbmpType
(int type) read
(int imageIndex, ImageReadParam param) void
readRaster
(int imageIndex, ImageReadParam param) void
reset()
void
Overrides the method defined in the superclass.Methods inherited from class javax.imageio.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
ConstructsWBMPImageReader
from the providedImageReaderSpi
.
-
-
Method Details
-
setInput
Overrides the method defined in the superclass.- Overrides:
setInput
in classImageReader
-
getNumImages
Overrides the method defined in the superclass.- Specified by:
getNumImages
in classImageReader
- Throws:
IOException
-
getWidth
- Specified by:
getWidth
in classImageReader
- Throws:
IOException
-
getHeight
- Specified by:
getHeight
in classImageReader
- Throws:
IOException
-
isRandomAccessEasy
- Overrides:
isRandomAccessEasy
in classImageReader
- Throws:
IOException
-
checkIndex
private void checkIndex(int imageIndex) -
readHeader
- Throws:
IOException
-
getImageTypes
- Specified by:
getImageTypes
in classImageReader
- Throws:
IOException
-
getDefaultReadParam
- Overrides:
getDefaultReadParam
in classImageReader
-
getImageMetadata
- Specified by:
getImageMetadata
in classImageReader
- Throws:
IOException
-
getStreamMetadata
- Specified by:
getStreamMetadata
in classImageReader
- Throws:
IOException
-
read
- Specified by:
read
in classImageReader
- Throws:
IOException
-
canReadRaster
public boolean canReadRaster()- Overrides:
canReadRaster
in classImageReader
-
readRaster
- Overrides:
readRaster
in classImageReader
- Throws:
IOException
-
reset
public void reset()- Overrides:
reset
in classImageReader
-
isValidWbmpType
boolean isValidWbmpType(int type)
-