it.geosolutions.imageio.plugins.turbojpeg
Class TurboJpegImageReader

Object
  extended by ImageReader
      extended by TurboJpegImageReader

public class TurboJpegImageReader
extends ImageReader

Author:
Emanuele Tajariol, GeoSolutions SaS, Daniele Romagnoli, GeoSolutions SaS An ImageReader for JPEG decompression using the TurboJPEG library. It can accept (as setInput method) both an ImageInputStream as any other ImageReader, as well as byte[] object. The last one is useful when the reader is initialized by a TiffImageReader having internally JPEG compressed tiles. It can pass down the byte[] array instead of doing any copy, repeated read of a buffer (Which should be faster)

Field Summary
 
Fields inherited from class ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
 
Constructor Summary
TurboJpegImageReader(ImageReaderSpi originatingProvider)
           
 
Method Summary
 void dispose()
           
 int getHeight(int imageIndex)
           
 IIOMetadata getImageMetadata(int imageIndex)
           
 Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex)
           
 int getNumImages(boolean allowSearch)
           
 IIOMetadata getStreamMetadata()
           
 int getWidth(int imageIndex)
           
 BufferedImage read(int imageIndex, ImageReadParam param)
           
 void reset()
           
 void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
           
protected static String toString(ImageReadParam param)
           
 
Methods inherited from class ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, 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, setInput, setInput, setLocale
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TurboJpegImageReader

public TurboJpegImageReader(ImageReaderSpi originatingProvider)
Method Detail

getNumImages

public int getNumImages(boolean allowSearch)
                 throws IOException
Specified by:
getNumImages in class ImageReader
Throws:
IOException

getWidth

public int getWidth(int imageIndex)
             throws IOException
Specified by:
getWidth in class ImageReader
Throws:
IOException

getHeight

public int getHeight(int imageIndex)
              throws IOException
Specified by:
getHeight in class ImageReader
Throws:
IOException

getImageTypes

public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex)
                                           throws IOException
Specified by:
getImageTypes in class ImageReader
Throws:
IOException

getStreamMetadata

public IIOMetadata getStreamMetadata()
                              throws IOException
Specified by:
getStreamMetadata in class ImageReader
Throws:
IOException

getImageMetadata

public IIOMetadata getImageMetadata(int imageIndex)
                             throws IOException
Specified by:
getImageMetadata in class ImageReader
Throws:
IOException

read

public BufferedImage read(int imageIndex,
                          ImageReadParam param)
                   throws IOException
Specified by:
read in class ImageReader
Throws:
IOException

setInput

public void setInput(Object input,
                     boolean seekForwardOnly,
                     boolean ignoreMetadata)
Overrides:
setInput in class ImageReader

reset

public void reset()
Overrides:
reset in class ImageReader

dispose

public void dispose()
Overrides:
dispose in class ImageReader

toString

protected static String toString(ImageReadParam param)


Copyright © 2006-2013 GeoSolutions. All Rights Reserved.