|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.imageio.ImageReader
it.tidalwave.imageio.raw.RAWImageReaderSupport
it.tidalwave.imageio.tiff.TIFFImageReaderSupport
public abstract class TIFFImageReaderSupport
This abstract class is provided as a support for implementing, by subclassing, an ImageReader for any TIFF-based image format.
| Field Summary | |
|---|---|
protected java.lang.Class |
makerNoteClass
The class of the maker note. |
| Fields inherited from class it.tidalwave.imageio.raw.RAWImageReaderSupport |
|---|
headerProcessor, iis, makerNote, metadata, metadataLoaded, primaryDirectory |
| Fields inherited from class javax.imageio.ImageReader |
|---|
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales |
| Constructor Summary | |
|---|---|
protected |
TIFFImageReaderSupport(javax.imageio.spi.ImageReaderSpi originatingProvider,
java.lang.Class makerNoteClass,
java.lang.Class metadataClass)
|
| Method Summary | |
|---|---|
protected void |
checkThumbnailIndex(int thumbnailIndex)
Checks the validity of a thumbnail index. |
protected RAWMetadataSupport |
createMetadata(Directory primaryDirectory,
Directory imageDirectory)
This method must be implemented by concrete subclasses to create an instance of RAWMetadataSupport. |
int |
getHeight(int imageIndex)
|
int |
getNumThumbnails(int imageIndex)
|
int |
getThumbnailHeight(int imageIndex,
int thumbnailIndex)
Overrides the default ImageReader implementation to avoid to actually load the thumbnail. |
int |
getThumbnailWidth(int imageIndex,
int thumbnailIndex)
Overrides the default ImageReader implementation by avoiding to actually load the thumbnail. |
int |
getWidth(int imageIndex)
|
protected void |
initializeRasterReader(int width,
int height,
int bitsPerSample,
RasterReader rasterReader)
|
protected java.awt.image.BufferedImage |
loadImage(int imageIndex)
A default implementation that just invokes loadRAWImage(). |
protected Directory |
loadPrimaryDirectory()
Loads the primary directory. |
protected java.awt.image.BufferedImage |
loadThumbnail(int imageIndex,
int thumbnailIndex)
This method must be implemented by concrete subclasses to load a thumbnail. |
protected void |
processEXIFAndMakerNote(Directory directory)
Processes the EXIF metadata, if present. |
static long |
processHeader(javax.imageio.stream.ImageInputStream iis,
HeaderProcessor skipper)
Processes a TIFF header and sets the endianness property for the given ImageInputStream. |
protected void |
processMakerNote()
|
protected void |
processMetadata()
Analyzes and sets various variables to point at different pieces of metadata. |
static void |
setByteOrder(javax.imageio.stream.ImageInputStream iis)
Sets the byteorder of the given ImageInputStream guessing it by the marker in the next 16-bit integer. |
| Methods inherited from class it.tidalwave.imageio.raw.RAWImageReaderSupport |
|---|
checkImageIndex, checkMetadataIsLoaded, createImage, dispose, disposeAll, ensureMetadataIsLoaded, failure, getImageMetadata, getImageTypes, getNumImages, getStreamMetadata, loadEmbeddedImage, loadMetadata, loadRAWImage, loadRAWRaster, processImageProgress, read, readerSupportsThumbnails, readThumbnail, reset, setInput, wrapInput |
| Methods inherited from class javax.imageio.ImageReader |
|---|
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getDefaultReadParam, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isRandomAccessEasy, isSeekForwardOnly, processImageComplete, 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Class makerNoteClass
| Constructor Detail |
|---|
protected TIFFImageReaderSupport(javax.imageio.spi.ImageReaderSpi originatingProvider,
java.lang.Class makerNoteClass,
java.lang.Class metadataClass)
| Method Detail |
|---|
public int getWidth(int imageIndex)
throws java.io.IOException
getWidth in class javax.imageio.ImageReaderjava.io.IOException
public int getHeight(int imageIndex)
throws java.io.IOException
getHeight in class javax.imageio.ImageReaderjava.io.IOException
public int getNumThumbnails(int imageIndex)
throws java.io.IOException
getNumThumbnails in class javax.imageio.ImageReaderjava.io.IOException
public int getThumbnailWidth(int imageIndex,
int thumbnailIndex)
throws java.io.IOException
getThumbnailWidth in class javax.imageio.ImageReaderjava.io.IOException
public int getThumbnailHeight(int imageIndex,
int thumbnailIndex)
throws java.io.IOException
getThumbnailHeight in class javax.imageio.ImageReaderjava.io.IOException
protected java.awt.image.BufferedImage loadThumbnail(int imageIndex,
int thumbnailIndex)
throws java.io.IOException
RAWImageReaderSupport
loadThumbnail in class RAWImageReaderSupportimageIndex - the index of the imagethumbnailIndex - the index of the thumbnail to load
java.io.IOException - if an I/O error occurs
protected java.awt.image.BufferedImage loadImage(int imageIndex)
throws java.io.IOException
loadImage in class RAWImageReaderSupportimageIndex - the imageIndex of the image to load - 0 is the only
valid value
java.io.IOException - if an I/O error occurs
public static long processHeader(javax.imageio.stream.ImageInputStream iis,
HeaderProcessor skipper)
throws java.io.IOException
iis - the ImageInputStream
java.io.IOException - if validation errors occur
public static void setByteOrder(javax.imageio.stream.ImageInputStream iis)
throws java.io.IOException
iis - the ImageInputSream to set the byte order to
java.io.IOException - if an error occurs
protected void initializeRasterReader(int width,
int height,
int bitsPerSample,
RasterReader rasterReader)
bitsPerSample - rasterReader -
protected Directory loadPrimaryDirectory()
throws java.io.IOException
loadPrimaryDirectory in class RAWImageReaderSupportjava.io.IOException - if an I/O error occurs
protected RAWMetadataSupport createMetadata(Directory primaryDirectory,
Directory imageDirectory)
RAWImageReaderSupportRAWMetadataSupport. Each SPI should use its own subclass.
createMetadata in class RAWImageReaderSupportprimaryDirectory - the primary directoryimageDirectory - the image directory
protected void processMetadata()
throws java.io.IOException
RAWImageReaderSupport
processMetadata in class RAWImageReaderSupportjava.io.IOException - if an I/O error occurs
protected void processEXIFAndMakerNote(Directory directory)
throws java.io.IOException
directory - the primary directory
java.io.IOException - if an I/O error occurs
protected void processMakerNote()
throws java.io.IOException
java.io.IOException
protected void checkThumbnailIndex(int thumbnailIndex)
throws java.io.IOException
thumbnailIndex - the thumbnail index
java.lang.IndexOutOfBoundsException - if the index is invalid
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||