public class TGAReader extends ImageReader implements JImageReader
Reader for Targa Truevision (.tga) images.
Most TGA variants are supported. Exceptions include 8-bit color mapped images
| Modifier and Type | Field and Description |
|---|---|
static int |
COLORMAP_NONE |
static int |
COLORMAP_PRESENT |
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales| Constructor and Description |
|---|
TGAReader() |
TGAReader(ImageReaderSpi originatingProvider) |
TGAReader(String string) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canReadImage(ImageInputStream iis) |
void |
createBufferedImage()
Creates a BufferedImage from the TGA image.
|
void |
exportImage(BufferedImage image,
String fileName)
Exports a (currently monochrome) TGA image.
|
int |
getHeight()
Returns the image's height.
|
int |
getHeight(int imageIndex) |
BufferedImage |
getImage()
Returns the image that the reader has imported.
|
IIOMetadata |
getImageMetadata(int imageIndex) |
Iterator<ImageTypeSpecifier> |
getImageTypes(int image) |
Map<String,String> |
getMetadata() |
String |
getMetadataSummary()
Returns a summary of the image's metadata.
|
int |
getNumImages(boolean whatever) |
IIOMetadata |
getStreamMetadata() |
int |
getWidth()
Returns the image's width.
|
int |
getWidth(int imageIndex) |
void |
parse() |
void |
processFile()
Processes the file supplied at initialization, and stores the image in the reader.
|
BufferedImage |
read(int imageIndex,
ImageReadParam ignored) |
void |
readFile() |
void |
readFile(ImageInputStream iis)
Reads the TGA file into the buffer.
|
String |
toString() |
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, dispose, getAspectRatio, getAvailableLocales, getDefaultReadParam, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, 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, reset, setInput, setInput, setInput, setLocalepublic static final int COLORMAP_NONE
public static final int COLORMAP_PRESENT
public TGAReader()
public TGAReader(ImageReaderSpi originatingProvider)
public TGAReader(String string)
public void processFile()
throws IllegalDataException,
UnsupportedVariantException
JImageReaderprocessFile in interface JImageReaderIllegalDataException - If the data is not valid for this type of reader.UnsupportedVariantException - If the supplied file is a variant of the reader's format that is not supported.public void readFile()
public void readFile(ImageInputStream iis)
iis - The ImageInputStream to readpublic void parse()
throws IllegalDataException,
UnsupportedVariantException
public void createBufferedImage()
public BufferedImage getImage()
JImageReadergetImage in interface JImageReaderpublic int getWidth()
JImageReadergetWidth in interface JImageReaderpublic int getHeight()
JImageReadergetHeight in interface JImageReaderpublic String getMetadataSummary()
JImageReadergetMetadataSummary in interface JImageReaderpublic void exportImage(BufferedImage image, String fileName)
image - The image to be exported.fileName - The name of the file, as it should be written to disk.public BufferedImage read(int imageIndex, ImageReadParam ignored)
read in class ImageReaderpublic IIOMetadata getImageMetadata(int imageIndex)
getImageMetadata in class ImageReaderpublic IIOMetadata getStreamMetadata()
getStreamMetadata in class ImageReaderpublic Iterator<ImageTypeSpecifier> getImageTypes(int image)
getImageTypes in class ImageReaderpublic int getHeight(int imageIndex)
getHeight in class ImageReaderpublic int getWidth(int imageIndex)
getWidth in class ImageReaderpublic int getNumImages(boolean whatever)
getNumImages in class ImageReaderpublic static boolean canReadImage(ImageInputStream iis)
Copyright © 2020. All rights reserved.