Class TGAImageReader
java.lang.Object
javax.imageio.ImageReader
com.twelvemonkeys.imageio.ImageReaderBase
com.twelvemonkeys.imageio.plugins.tga.TGAImageReader
-
Field Summary
FieldsFields 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) int
getHeight
(int imageIndex) getImageMetadata
(int imageIndex) Default implementation that always returnsnull
.getImageTypes
(int imageIndex) int
getNumThumbnails
(int imageIndex) getRawImageType
(int imageIndex) int
getThumbnailHeight
(int imageIndex, int thumbnailIndex) int
getThumbnailWidth
(int imageIndex, int thumbnailIndex) int
getWidth
(int imageIndex) boolean
hasThumbnails
(int imageIndex) private boolean
isOriginLowerLeft
(int origin) static void
read
(int imageIndex, ImageReadParam param) boolean
private static void
private static void
private void
private void
readRowByte
(DataInput input, int height, Rectangle srcRegion, boolean flip, int xSub, int ySub, byte[] rowDataByte, WritableRaster destChannel, Raster srcChannel, int y) private void
readRowInt
(DataInput input, int height, Rectangle srcRegion, boolean flip, int xSub, int ySub, int[] rowDataInt, WritableRaster destChannel, Raster srcChannel, int y) private void
readRowUShort
(DataInput input, int height, Rectangle srcRegion, boolean flip, int xSub, int ySub, short[] rowDataUShort, WritableRaster destChannel, Raster srcChannel, int y) readThumbnail
(int imageIndex, int thumbnailIndex) private void
removeAlpha32
(byte[] rowData) protected void
Resets all member variables.private static void
skipToEnd
(ImageInputStream stream) Methods inherited from class com.twelvemonkeys.imageio.ImageReaderBase
assertInput, checkBounds, dispose, fakeAOI, fakeSubsampling, getDestination, getNumImages, 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, getOriginatingProvider, getSourceRegion, getStreamMetadata, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, 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, readRaster, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocale
-
Field Details
-
header
-
extensions
-
-
Constructor Details
-
TGAImageReader
TGAImageReader(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
-
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
-
isOriginLowerLeft
- Throws:
IIOException
-
readRowByte
private void readRowByte(DataInput input, int height, Rectangle srcRegion, boolean flip, int xSub, int ySub, byte[] rowDataByte, WritableRaster destChannel, Raster srcChannel, int y) throws IOException - Throws:
IOException
-
removeAlpha32
private void removeAlpha32(byte[] rowData) -
readRowUShort
private void readRowUShort(DataInput input, int height, Rectangle srcRegion, boolean flip, 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, boolean flip, int xSub, int ySub, int[] rowDataInt, WritableRaster destChannel, Raster srcChannel, int y) throws IOException - Throws:
IOException
-
readFully
- Throws:
IOException
-
readFully
- Throws:
IOException
-
clipRowToRect
-
clipToRect
-
readHeader
- Throws:
IOException
-
skipToEnd
- Throws:
IOException
-
readerSupportsThumbnails
public boolean readerSupportsThumbnails()- Overrides:
readerSupportsThumbnails
in classImageReader
-
hasThumbnails
- Overrides:
hasThumbnails
in classImageReader
- Throws:
IOException
-
getNumThumbnails
- Overrides:
getNumThumbnails
in classImageReader
- Throws:
IOException
-
getThumbnailWidth
- Overrides:
getThumbnailWidth
in classImageReader
- Throws:
IOException
-
getThumbnailHeight
- Overrides:
getThumbnailHeight
in classImageReader
- Throws:
IOException
-
readThumbnail
- Overrides:
readThumbnail
in classImageReader
- 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.
-
main
- Throws:
IOException
-