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, setLocalepublic PBMImageReader(PBMImageReaderSpi originatingProvider)
public int getNumImages(boolean allowSearch)
throws java.io.IOException
getNumImages in class javax.imageio.ImageReaderjava.io.IOExceptionpublic int getWidth(int imageIndex)
throws java.io.IOException
getWidth in class javax.imageio.ImageReaderjava.io.IOExceptionpublic int getHeight(int imageIndex)
throws java.io.IOException
getHeight in class javax.imageio.ImageReaderjava.io.IOExceptionpublic java.util.Iterator<javax.imageio.ImageTypeSpecifier> getImageTypes(int imageIndex)
throws java.io.IOException
getImageTypes in class javax.imageio.ImageReaderjava.io.IOExceptionpublic 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.ImageReaderimageIndex - 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.ImageReaderjava.io.IOExceptionpublic javax.imageio.metadata.IIOMetadata getImageMetadata(int imageIndex)
throws java.io.IOException
getImageMetadata in class javax.imageio.ImageReaderjava.io.IOExceptionpublic java.awt.image.BufferedImage read(int imageIndex,
javax.imageio.ImageReadParam param)
throws java.io.IOException
read in class javax.imageio.ImageReaderjava.io.IOException