Class WebPImageReader
java.lang.Object
javax.imageio.ImageReader
com.twelvemonkeys.imageio.ImageReaderBase
com.twelvemonkeys.imageio.plugins.webp.WebPImageReader
WebPImageReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ICC_Profile
(package private) static final boolean
private long
private final List
<AnimationFrame> private VP8xChunk
private ICC_Profile
private LSBBitReader
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 void
alphaFilter
(WritableRaster alphaRaster, int filtering) private void
applyICCProfileIfNeeded
(BufferedImage destination) (package private) static String
fourCC
(int value) int
getHeight
(int imageIndex) getImageMetadata
(int imageIndex) Default implementation that always returnsnull
.getImageTypes
(int imageIndex) int
getNumImages
(boolean allowSearch) Default implementation that always returns1
.private int
getPredictorAlpha
(WritableRaster alphaRaster, int filtering, int y, int x) getRawImageType
(int imageIndex) int
getWidth
(int imageIndex) private void
opaqueAlpha
(WritableRaster alphaRaster) read
(int imageIndex, ImageReadParam param) private void
private void
readAlpha
(BufferedImage destination, ImageReadParam param, int width, int height) private void
readFrame
(int frameIndex) private void
private void
readHeader
(int imageIndex) private void
readMeta()
private void
readUncompressedAlpha
(WritableRaster alphaRaster) private void
readVP8
(WritableRaster raster, ImageReadParam param) private void
readVP8Extended
(BufferedImage destination, ImageReadParam param, long streamEnd) private void
readVP8Extended
(BufferedImage destination, ImageReadParam param, long streamEnd, int width, int height) private void
readVP8Lossless
(WritableRaster raster, ImageReadParam param) private void
readVP8Lossless
(WritableRaster raster, ImageReadParam param, int width, int height) protected void
Resets all member variables.void
OverridessetInput
, to allow easy access to the input, in case it is anImageInputStream
.Methods inherited from class com.twelvemonkeys.imageio.ImageReaderBase
assertInput, checkBounds, dispose, fakeAOI, fakeSubsampling, getDestination, getStreamMetadata, hasExplicitDestination, main, reset, 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
-
DEBUG
static final boolean DEBUG -
lsbBitReader
-
fileSize
private long fileSize -
header
-
containedICCP
-
iccProfile
-
frames
-
-
Constructor Details
-
WebPImageReader
WebPImageReader(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
-
setInput
Description copied from class:ImageReaderBase
OverridessetInput
, to allow easy access to the input, in case it is anImageInputStream
.- Overrides:
setInput
in classImageReaderBase
- Parameters:
input
- theImageInputStream
or otherObject
to use for future decoding.seekForwardOnly
- iftrue
, images and metadata may only be read in ascending order from this input source.ignoreMetadata
- iftrue
, metadata may be ignored during reads.- See Also:
-
readHeader
- Throws:
IOException
-
readFrame
- Throws:
IOException
-
readHeader
- Throws:
IOException
-
fourCC
-
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
-
readAllFrames
- Throws:
IOException
-
getWidth
- Specified by:
getWidth
in classImageReader
- Throws:
IOException
-
getHeight
- Specified by:
getHeight
in classImageReader
- Throws:
IOException
-
getRawImageType
- Overrides:
getRawImageType
in classImageReader
- Throws:
IOException
-
getImageTypes
- Specified by:
getImageTypes
in classImageReader
- Throws:
IOException
-
read
- Specified by:
read
in classImageReader
- Throws:
IOException
-
readVP8Extended
private void readVP8Extended(BufferedImage destination, ImageReadParam param, long streamEnd) throws IOException - Throws:
IOException
-
readVP8Extended
private void readVP8Extended(BufferedImage destination, ImageReadParam param, long streamEnd, int width, int height) throws IOException - Throws:
IOException
-
readAlpha
private void readAlpha(BufferedImage destination, ImageReadParam param, int width, int height) throws IOException - Throws:
IOException
-
alphaFilter
-
getPredictorAlpha
-
applyICCProfileIfNeeded
-
opaqueAlpha
-
readUncompressedAlpha
- Throws:
IOException
-
readVP8Lossless
- Throws:
IOException
-
readVP8Lossless
private void readVP8Lossless(WritableRaster raster, ImageReadParam param, int width, int height) throws IOException - Throws:
IOException
-
readVP8
- Throws:
IOException
-
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.
-
readMeta
- Throws:
IOException
-