gnu.javax.imageio.bmp
Class BMPImageReader
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) - Returns the number of images.
|
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) - Reads the image indexed by imageIndex and returns it as
a complete BufferedImage, using a supplied ImageReadParam.
|
void | setInput(Object input) - Set the input source to the given object.
|
void | setInput(Object input, boolean isStreamable) - Set the input source to the given object and specify whether this
reader should be allowed to read input from the data stream more
than once.
|
void | setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata) - Set the input source to the given object, specify whether this
reader should be allowed to read input from the data stream more
than once, and specify whether this reader should ignore metadata
in the input stream.
|
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 |
BMPImageReader
protected BMPImageReader(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)
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)
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
getStreamMetadata
public IIOMetadata getStreamMetadata()
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
setInput
public void setInput(Object input)
Set the input source to the given object. The input source must
be set before many methods can be called on this reader. (see all
ImageReader methods that throw IllegalStateException). If input
is null then the current input source will be removed.
- setInput in interface ImageReader
input
- the input source object
setInput
public void setInput(Object input,
boolean isStreamable)
Set the input source to the given object and specify whether this
reader should be allowed to read input from the data stream more
than once. The input source must be set before many methods can
be called on this reader. (see all ImageReader methods that throw
IllegalStateException). If input is null then the current input
source will be removed.
- setInput in interface ImageReader
setInput
public void setInput(Object input,
boolean seekForwardOnly,
boolean ignoreMetadata)
Set the input source to the given object, specify whether this
reader should be allowed to read input from the data stream more
than once, and specify whether this reader should ignore metadata
in the input stream. The input source must be set before many
methods can be called on this reader. (see all ImageReader
methods that throw IllegalStateException). If input is null then
the current input source will be removed.
Unless this reader has direct access with imaging hardware, input
should be an ImageInputStream.
- setInput in interface ImageReader
input
- the input source objectseekForwardOnly
- true if this reader should be allowed to
read input from the data stream more than once, false otherwiseignoreMetadata
- true if this reader should ignore metadata
associated with the input source, false otherwise
BMPImageReader.java --
Copyright (C) 2005 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.