Class IFFImageReader
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.
- Version:
- $Id: IFFImageReader.java,v 1.0 29.aug.2004 20:26:58 haku Exp $
- Author:
- Harald Kuhr, last modified by $Author: haku $
- See Also:
-
Field Summary
Fields inherited from class com.twelvemonkeys.imageio.ImageReaderBase
imageInputFields inherited from class javax.imageio.ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales -
Method Summary
Modifier and TypeMethodDescriptionintgetHeight(int imageIndex) getImageMetadata(int imageIndex) getImageTypes(int imageIndex) intgetNumThumbnails(int imageIndex) getRawImageType(int pIndex) intgetThumbnailHeight(int imageIndex, int thumbnailIndex) intgetThumbnailWidth(int imageIndex, int thumbnailIndex) intgetWidth(int imageIndex) booleanhasThumbnails(int imageIndex) static voidread(int imageIndex, ImageReadParam param) booleanreadThumbnail(int imageIndex, int thumbnailIndex) protected voidMethods inherited from class com.twelvemonkeys.imageio.ImageReaderBase
assertInput, checkBounds, dispose, fakeAOI, fakeSubsampling, getDestination, getNumImages, getStreamMetadata, hasExplicitDestination, reset, setInput, showItMethods 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
-
Method Details
-
resetMembers
protected void resetMembers()- Specified by:
resetMembersin classcom.twelvemonkeys.imageio.ImageReaderBase
-
read
- Specified by:
readin classImageReader- Throws:
IOException
-
readerSupportsThumbnails
public boolean readerSupportsThumbnails()- Overrides:
readerSupportsThumbnailsin classImageReader
-
hasThumbnails
- Overrides:
hasThumbnailsin classImageReader- Throws:
IOException
-
getNumThumbnails
- Overrides:
getNumThumbnailsin classImageReader- Throws:
IOException
-
getThumbnailWidth
- Overrides:
getThumbnailWidthin classImageReader- Throws:
IOException
-
getThumbnailHeight
- Overrides:
getThumbnailHeightin classImageReader- Throws:
IOException
-
readThumbnail
- Overrides:
readThumbnailin classImageReader- Throws:
IOException
-
getWidth
- Specified by:
getWidthin classImageReader- Throws:
IOException
-
getHeight
- Specified by:
getHeightin classImageReader- Throws:
IOException
-
getImageMetadata
- Overrides:
getImageMetadatain classcom.twelvemonkeys.imageio.ImageReaderBase- Throws:
IOException
-
getImageTypes
- Specified by:
getImageTypesin classImageReader- Throws:
IOException
-
getRawImageType
- Overrides:
getRawImageTypein classImageReader- Throws:
IOException
-
main
-