gnu.javax.imageio.jpeg
Class JPEGImageReader
availableLocales , ignoreMetadata , input , locale , minIndex , originatingProvider , progressListeners , seekForwardOnly , updateListeners , warningListeners , warningLocales |
int | getHeight(int imageIndex) - Get the height of the input image in pixels.
|
IIOMetadata | getImageMetadata(int imageIndex) - Get the metadata associated with this image.
|
Iterator<E> | getImageTypes(int imageIndex) - Get an iterator over the collection of image types into which
this reader can decode image data.
|
int | getNumImages(boolean allowSearch) - Return the number of images available from the image input
source, not including thumbnails.
|
IIOMetadata | getStreamMetadata() - Get the metadata associated with the image being read.
|
int | getWidth(int imageIndex) - Get the width of the input image in pixels.
|
BufferedImage | read(int imageIndex, ImageReadParam param) - Read the given frame into a buffered image using the given read
parameters.
|
abort , abortRequested , addIIOReadProgressListener , addIIOReadUpdateListener , addIIOReadWarningListener , canReadRaster , checkReadParamBandSettings , clearAbortRequest , computeRegions , dispose , getAspectRatio , getAvailableLocales , getDefaultReadParam , getDestination , getFormatName , getHeight , getImageMetadata , getImageMetadata , getImageTypes , getInput , getLocale , getMinIndex , getNumImages , getNumThumbnails , getOriginatingProvider , getRawImageType , getSourceRegion , getStreamMetadata , getStreamMetadata , getThumbnailHeight , getThumbnailWidth , getTileGridXOffset , getTileGridYOffset , getTileHeight , getTileWidth , getWidth , hasThumbnails , isIgnoringMetadata , isImageTiled , isRandomAccessEasy , isSeekForwardOnly , processImageComplete , processImageProgress , processImageStarted , processImageUpdate , processPassComplete , processPassStarted , processReadAborted , processSequenceComplete , processSequenceStarted , processThumbnailComplete , processThumbnailPassComplete , processThumbnailPassStarted , processThumbnailProgress , processThumbnailStarted , processThumbnailUpdate , processWarningOccurred , processWarningOccurred , read , read , readAll , readAll , readAsRenderedImage , readRaster , readThumbnail , readTile , readTileRaster , readerSupportsThumbnails , removeAllIIOReadProgressListeners , removeAllIIOReadUpdateListeners , removeAllIIOReadWarningListeners , removeIIOReadProgressListener , removeIIOReadUpdateListener , removeIIOReadWarningListener , reset , setInput , setInput , setInput , setLocale |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
JPEGImageReader
protected JPEGImageReader(ImageReaderSpi originatingProvider)
Construct an image reader.
originatingProvider
- the provider that is constructing this
image reader, or null
getHeight
public int getHeight(int imageIndex)
throws IOException
Get the height of the input image in pixels. If the input image
is resizable then a default height is returned.
- getHeight in interface ImageReader
imageIndex
- the frame index
- the height of the input image
getImageMetadata
public IIOMetadata getImageMetadata(int imageIndex)
throws IOException
Get the metadata associated with this image. If the reader is
set to ignore metadata or does not support reading metadata, or
if no metadata is available then null is returned.
- getImageMetadata in interface ImageReader
imageIndex
- the frame index
- a metadata object, or null
getImageTypes
public Iterator<E> getImageTypes(int imageIndex)
throws IOException
Get an iterator over the collection of image types into which
this reader can decode image data. This method is guaranteed to
return at least one valid image type specifier.
The elements of the iterator should be ordered; the first element
should be the most appropriate image type for this decoder,
followed by the second-most appropriate, and so on.
- getImageTypes in interface ImageReader
imageIndex
- the frame index
- an iterator over a collection of image type specifiers
getNumImages
public int getNumImages(boolean allowSearch)
throws IOException
Return the number of images available from the image input
source, not including thumbnails. This method will return 1
unless this reader is reading an animated image.
Certain multi-image formats do not encode the total number of
images. When reading images in those formats it may be necessary
to repeatedly call read, incrementing the image index at each
call, until an IndexOutOfBoundsException is thrown.
The allowSearch parameter determines whether all images must be
available at all times. When allowSearch is false, getNumImages
will return -1 if the total number of images is unknown.
Otherwise this method returns the number of images.
- getNumImages in interface ImageReader
allowSearch
- true if all images should be available at
once, false otherwise
- -1 if allowSearch is false and the total number of images
is currently unknown, or the number of images
getStreamMetadata
public IIOMetadata getStreamMetadata()
throws IOException
Get the metadata associated with the image being read. If the
reader is set to ignore metadata or does not support reading
metadata, or if no metadata is available then null is returned.
This method returns metadata associated with the entirety of the
image data, whereas getImageMetadata(int) returns metadata
associated with a frame within a multi-image data stream.
- getStreamMetadata in interface ImageReader
- metadata associated with the image being read, or null
getWidth
public int getWidth(int imageIndex)
throws IOException
Get the width of the input image in pixels. If the input image
is resizable then a default width is returned.
- getWidth in interface ImageReader
imageIndex
- the image's index
- the width of the input image
read
public BufferedImage read(int imageIndex,
ImageReadParam param)
throws IOException
Read the given frame into a buffered image using the given read
parameters. Listeners will be notified of image loading progress
and warnings.
- read in interface ImageReader
imageIndex
- the index of the frame to readparam
- the image read parameters to use when reading
JPEGImageReader.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.