it.geosolutions.imageio.plugins.jpeg
Class JpegJMagickImageReader

Object
  extended by ImageReader
      extended by JpegJMagickImageReader

public class JpegJMagickImageReader
extends ImageReader

JpegJMagickImageReader is a GDALImageReader able to create RenderedImage from JPEG files.

Author:
Daniele Romagnoli, GeoSolutions., Simone Giannecchini, GeoSolutions.

Nested Class Summary
static class JpegJMagickImageReader.JpegJMagickImageReaderReadParam
          Implementation of ImageReadParam for this JpegJMagickImageReader.
static class JpegJMagickImageReader.MagickImageAdapter
          JpegJMagickImageReader.MagickImageAdapter containes code to adapt a MagickImage to a BufferedImage.
 
Field Summary
 
Fields inherited from class ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
 
Constructor Summary
JpegJMagickImageReader(JpegJMagickImageReaderSpi originatingProvider)
           
 
Method Summary
 void dispose()
          Allows any resources held by this object to be released.
protected  void finalize()
           
 ImageReadParam getDefaultReadParam()
           
 int getHeight(int imageIndex)
          Returns the height in pixels of the given image within the input source.
 IIOMetadata getImageMetadata(int imageIndex)
          Actually, this method is not supported and it throws an UnsupportedOperationException
 Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex)
           
 int getNumImages(boolean allowSearch)
           
 IIOMetadata getStreamMetadata()
          Actually, this method is not supported and it throws an UnsupportedOperationException
 int getWidth(int imageIndex)
          Returns the width in pixels of the given image within the input source.
 BufferedImage read(int imageIndex, ImageReadParam param)
          Read the imageMagick and returns it as a complete BufferedImage, using a supplied ImageReadParam.
 void setInput(Object input)
          Sets the input source to use to the given Object, usually a File or a FileImageInputStreamExt
 void setInput(Object input, boolean seekForwardOnly)
          Sets the input source to use to the given Object, usually a File or a FileImageInputStreamExt
 void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
          Sets the input source to use to the given Object, usually a File or a FileImageInputStreamExt
 
Methods inherited from class ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, 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, reset, setLocale
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpegJMagickImageReader

public JpegJMagickImageReader(JpegJMagickImageReaderSpi originatingProvider)
Method Detail

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

getDefaultReadParam

public ImageReadParam getDefaultReadParam()
Overrides:
getDefaultReadParam in class ImageReader

getHeight

public int getHeight(int imageIndex)
              throws IOException
Returns the height in pixels of the given image within the input source.

Specified by:
getHeight in class ImageReader
Parameters:
imageIndex - the index of the image to be queried.
Returns:
the height of the image, as an int.
Throws:
IOException

getWidth

public int getWidth(int imageIndex)
             throws IOException
Returns the width in pixels of the given image within the input source.

Specified by:
getWidth in class ImageReader
Parameters:
imageIndex - the index of the image to be queried.
Returns:
the width of the image, as an int.
Throws:
IOException

getImageTypes

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

getNumImages

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

getImageMetadata

public IIOMetadata getImageMetadata(int imageIndex)
                             throws IOException
Actually, this method is not supported and it throws an UnsupportedOperationException

Specified by:
getImageMetadata in class ImageReader
Throws:
IOException

getStreamMetadata

public IIOMetadata getStreamMetadata()
                              throws IOException
Actually, this method is not supported and it throws an UnsupportedOperationException

Specified by:
getStreamMetadata in class ImageReader
Throws:
IOException

read

public BufferedImage read(int imageIndex,
                          ImageReadParam param)
                   throws IOException
Read the imageMagick and returns it as a complete BufferedImage, using a supplied ImageReadParam.

Specified by:
read in class ImageReader
Parameters:
imageIndex - the index of the image to be retrieved.
param - an ImageReadParam used to control the reading process, or null.
Throws:
IOException

setInput

public void setInput(Object input,
                     boolean seekForwardOnly,
                     boolean ignoreMetadata)
Sets the input source to use to the given Object, usually a File or a FileImageInputStreamExt

Overrides:
setInput in class ImageReader

setInput

public void setInput(Object input,
                     boolean seekForwardOnly)
Sets the input source to use to the given Object, usually a File or a FileImageInputStreamExt

Overrides:
setInput in class ImageReader

setInput

public void setInput(Object input)
Sets the input source to use to the given Object, usually a File or a FileImageInputStreamExt

Overrides:
setInput in class ImageReader

dispose

public void dispose()
Allows any resources held by this object to be released.

Overrides:
dispose in class ImageReader


Copyright © 2006-2010 GeoSolutions. All Rights Reserved.