Class IFFImageReader
- java.lang.Object
-
- javax.imageio.ImageReader
-
- com.twelvemonkeys.imageio.ImageReaderBase
-
- com.twelvemonkeys.imageio.plugins.iff.IFFImageReader
-
public final class IFFImageReader extends com.twelvemonkeys.imageio.ImageReaderBaseReader for Commodore Amiga (Electronic Arts) IFF ILBM (InterLeaved BitMap) and PBM format (Packed BitMap). Also supports IFF RGB8 (Impulse) and IFF DEEP (TVPaint). The IFF format (Interchange File Format) is the standard file format supported by allmost all image software for the Amiga computer.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
BufferedImageofTYPE_BYTE_INDEXEDorBufferedImage#depending on the bit depth. Gray images are read asTYPE_BYTE_GRAY. 24 bit true-color images are read asTYPE_3BYTE_BGR. 32 bit true-color images are read asTYPE_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
IndexColorModelsubclass 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 anIndexColorModelwith 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:
- Wikipedia: IFF, Wikipedia: IFF ILBM
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetHeight(int imageIndex)javax.imageio.metadata.IIOMetadatagetImageMetadata(int imageIndex)java.util.Iterator<javax.imageio.ImageTypeSpecifier>getImageTypes(int imageIndex)intgetNumThumbnails(int imageIndex)javax.imageio.ImageTypeSpecifiergetRawImageType(int pIndex)intgetThumbnailHeight(int imageIndex, int thumbnailIndex)intgetThumbnailWidth(int imageIndex, int thumbnailIndex)intgetWidth(int imageIndex)booleanhasThumbnails(int imageIndex)static voidmain(java.lang.String[] args)java.awt.image.BufferedImageread(int imageIndex, javax.imageio.ImageReadParam param)booleanreaderSupportsThumbnails()java.awt.image.BufferedImagereadThumbnail(int imageIndex, int thumbnailIndex)protected voidresetMembers()-
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
-
-
-
-
Method Detail
-
resetMembers
protected void resetMembers()
- Specified by:
resetMembersin classcom.twelvemonkeys.imageio.ImageReaderBase
-
read
public java.awt.image.BufferedImage read(int imageIndex, javax.imageio.ImageReadParam param) throws java.io.IOException- Specified by:
readin classjavax.imageio.ImageReader- Throws:
java.io.IOException
-
readerSupportsThumbnails
public boolean readerSupportsThumbnails()
- Overrides:
readerSupportsThumbnailsin classjavax.imageio.ImageReader
-
hasThumbnails
public boolean hasThumbnails(int imageIndex) throws java.io.IOException- Overrides:
hasThumbnailsin classjavax.imageio.ImageReader- Throws:
java.io.IOException
-
getNumThumbnails
public int getNumThumbnails(int imageIndex) throws java.io.IOException- Overrides:
getNumThumbnailsin classjavax.imageio.ImageReader- Throws:
java.io.IOException
-
getThumbnailWidth
public int getThumbnailWidth(int imageIndex, int thumbnailIndex) throws java.io.IOException- Overrides:
getThumbnailWidthin classjavax.imageio.ImageReader- Throws:
java.io.IOException
-
getThumbnailHeight
public int getThumbnailHeight(int imageIndex, int thumbnailIndex) throws java.io.IOException- Overrides:
getThumbnailHeightin classjavax.imageio.ImageReader- Throws:
java.io.IOException
-
readThumbnail
public java.awt.image.BufferedImage readThumbnail(int imageIndex, int thumbnailIndex) throws java.io.IOException- Overrides:
readThumbnailin classjavax.imageio.ImageReader- Throws:
java.io.IOException
-
getWidth
public int getWidth(int imageIndex) throws java.io.IOException- Specified by:
getWidthin classjavax.imageio.ImageReader- Throws:
java.io.IOException
-
getHeight
public int getHeight(int imageIndex) throws java.io.IOException- Specified by:
getHeightin classjavax.imageio.ImageReader- Throws:
java.io.IOException
-
getImageMetadata
public javax.imageio.metadata.IIOMetadata getImageMetadata(int imageIndex) throws java.io.IOException- Overrides:
getImageMetadatain classcom.twelvemonkeys.imageio.ImageReaderBase- Throws:
java.io.IOException
-
getImageTypes
public java.util.Iterator<javax.imageio.ImageTypeSpecifier> getImageTypes(int imageIndex) throws java.io.IOException- Specified by:
getImageTypesin classjavax.imageio.ImageReader- Throws:
java.io.IOException
-
getRawImageType
public javax.imageio.ImageTypeSpecifier getRawImageType(int pIndex) throws java.io.IOException- Overrides:
getRawImageTypein classjavax.imageio.ImageReader- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args)
-
-