public final class IFFImageReader extends ImageReaderBase
This reader supports the original palette-based 1-8 bit formats, including EHB (Extra Half-Bright), HAM (Hold and Modify), and the more recent "deep" formats, 8 bit gray, 24 bit RGB and 32 bit ARGB. Uncompressed and ByteRun1 compressed (run length encoding) files are supported.
Palette based images are read as BufferedImage of
TYPE_BYTE_INDEXED or
BufferedImage#
depending on the bit depth.
Gray images are read as
TYPE_BYTE_GRAY.
24 bit true-color images are read as
TYPE_3BYTE_BGR.
32 bit true-color images are read as
TYPE_4BYTE_ABGR.
Issues: HAM and HAM8 (Hold and Modify) formats are converted to RGB (24 bit),
as it seems to be very hard to create an IndexColorModel subclass
that would correctly describe these formats.
These formats utilizes the special display hardware in the Amiga computers.
HAM (6 bits) needs 12 bits storage/pixel, if unpacked to RGB (4 bits/gun).
HAM8 (8 bits) needs 18 bits storage/pixel, if unpacked to RGB (6 bits/gun).
See Wikipedia: HAM
for more information.
EHB palette is expanded to an IndexColorModel with 64 entries.
See Wikipedia: EHB
for more information.
imageInputavailableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales| Modifier and Type | Method and Description |
|---|---|
int |
getHeight(int imageIndex) |
IIOMetadata |
getImageMetadata(int imageIndex) |
Iterator<ImageTypeSpecifier> |
getImageTypes(int imageIndex) |
int |
getNumThumbnails(int imageIndex) |
ImageTypeSpecifier |
getRawImageType(int pIndex) |
int |
getThumbnailHeight(int imageIndex,
int thumbnailIndex) |
int |
getThumbnailWidth(int imageIndex,
int thumbnailIndex) |
int |
getWidth(int imageIndex) |
boolean |
hasThumbnails(int imageIndex) |
static void |
main(String[] args) |
BufferedImage |
read(int imageIndex,
ImageReadParam param) |
boolean |
readerSupportsThumbnails() |
BufferedImage |
readThumbnail(int imageIndex,
int thumbnailIndex) |
protected void |
resetMembers() |
assertInput, checkBounds, dispose, fakeAOI, fakeSubsampling, getDestination, getNumImages, getStreamMetadata, hasExplicitDestination, reset, setInput, showItabort, 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, setLocaleprotected void resetMembers()
resetMembers in class ImageReaderBasepublic BufferedImage read(int imageIndex, ImageReadParam param) throws IOException
read in class ImageReaderIOExceptionpublic boolean readerSupportsThumbnails()
readerSupportsThumbnails in class ImageReaderpublic boolean hasThumbnails(int imageIndex)
throws IOException
hasThumbnails in class ImageReaderIOExceptionpublic int getNumThumbnails(int imageIndex)
throws IOException
getNumThumbnails in class ImageReaderIOExceptionpublic int getThumbnailWidth(int imageIndex,
int thumbnailIndex)
throws IOException
getThumbnailWidth in class ImageReaderIOExceptionpublic int getThumbnailHeight(int imageIndex,
int thumbnailIndex)
throws IOException
getThumbnailHeight in class ImageReaderIOExceptionpublic BufferedImage readThumbnail(int imageIndex, int thumbnailIndex) throws IOException
readThumbnail in class ImageReaderIOExceptionpublic int getWidth(int imageIndex)
throws IOException
getWidth in class ImageReaderIOExceptionpublic int getHeight(int imageIndex)
throws IOException
getHeight in class ImageReaderIOExceptionpublic IIOMetadata getImageMetadata(int imageIndex) throws IOException
getImageMetadata in class ImageReaderBaseIOExceptionpublic Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) throws IOException
getImageTypes in class ImageReaderIOExceptionpublic ImageTypeSpecifier getRawImageType(int pIndex) throws IOException
getRawImageType in class ImageReaderIOExceptionpublic static void main(String[] args)
Copyright © 2022. All rights reserved.