public class PBMImageReader
extends javax.imageio.ImageReader
Constructor and Description |
---|
PBMImageReader(PBMImageReaderSpi originatingProvider) |
Modifier and Type | Method and Description |
---|---|
float |
getAspectRatio(int imageIndex)
Returns the aspect ratio of the given image (that is, its width
divided by its height) as a
float . |
int |
getHeight(int imageIndex) |
javax.imageio.metadata.IIOMetadata |
getImageMetadata(int imageIndex) |
java.util.Iterator<javax.imageio.ImageTypeSpecifier> |
getImageTypes(int imageIndex) |
int |
getNumImages(boolean allowSearch) |
javax.imageio.metadata.IIOMetadata |
getStreamMetadata() |
int |
getWidth(int imageIndex) |
java.awt.image.BufferedImage |
read(int imageIndex,
javax.imageio.ImageReadParam param) |
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, dispose, 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, reset, setInput, setInput, setInput, setLocale
public PBMImageReader(PBMImageReaderSpi originatingProvider)
public int getNumImages(boolean allowSearch) throws java.io.IOException
getNumImages
in class javax.imageio.ImageReader
java.io.IOException
public int getWidth(int imageIndex) throws java.io.IOException
getWidth
in class javax.imageio.ImageReader
java.io.IOException
public int getHeight(int imageIndex) throws java.io.IOException
getHeight
in class javax.imageio.ImageReader
java.io.IOException
public java.util.Iterator<javax.imageio.ImageTypeSpecifier> getImageTypes(int imageIndex) throws java.io.IOException
getImageTypes
in class javax.imageio.ImageReader
java.io.IOException
public float getAspectRatio(int imageIndex) throws java.io.IOException
float
. For images
that are inherently resizable, this method provides a way to
determine the appropriate width given a deired height, or vice
versa. For non-resizable images, the true width and height
are used.
The default implementation simply returns
(float)getWidth(imageIndex)/getHeight(imageIndex)
.
getAspectRatio
in class javax.imageio.ImageReader
imageIndex
- the index of the image to be queried.float
indicating the aspect ratio of the
given image.java.lang.IllegalStateException
- if the input source has not been set.java.lang.IndexOutOfBoundsException
- if the supplied index is
out of bounds.java.io.IOException
- if an error occurs during reading.public javax.imageio.metadata.IIOMetadata getStreamMetadata() throws java.io.IOException
getStreamMetadata
in class javax.imageio.ImageReader
java.io.IOException
public javax.imageio.metadata.IIOMetadata getImageMetadata(int imageIndex) throws java.io.IOException
getImageMetadata
in class javax.imageio.ImageReader
java.io.IOException
public java.awt.image.BufferedImage read(int imageIndex, javax.imageio.ImageReadParam param) throws java.io.IOException
read
in class javax.imageio.ImageReader
java.io.IOException