public class JPEGImageReader extends ImageReaderBase
ImageReader implementation based on the JRE JPEGImageReader,
that adds support and properly handles cases where the JRE version throws exceptions.
Main features:
ICC_PROFILE segments (image data is read, profile is ignored)javax_imageio_jpeg_image_1.0 format (currently as native format, may change in the future)javax_imageio_jpeg_image_1.0 format)imageInputavailableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales| Modifier | Constructor and Description |
|---|---|
protected |
JPEGImageReader(ImageReaderSpi provider,
ImageReader delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
boolean |
canReadRaster() |
void |
dispose() |
protected ICC_Profile |
ensureDisplayProfile(ICC_Profile profile) |
protected ICC_Profile |
getEmbeddedICCProfile(boolean allowBadIndexes) |
String |
getFormatName() |
int |
getHeight(int imageIndex) |
IIOMetadata |
getImageMetadata(int imageIndex) |
Iterator<ImageTypeSpecifier> |
getImageTypes(int imageIndex) |
int |
getNumImages(boolean allowSearch) |
int |
getNumThumbnails(int imageIndex) |
ImageTypeSpecifier |
getRawImageType(int imageIndex) |
IIOMetadata |
getStreamMetadata() |
int |
getThumbnailHeight(int imageIndex,
int thumbnailIndex) |
int |
getThumbnailWidth(int imageIndex,
int thumbnailIndex) |
int |
getWidth(int imageIndex) |
boolean |
isRandomAccessEasy(int imageIndex) |
static void |
main(String[] args) |
protected void |
processWarningOccurred(String warning) |
BufferedImage |
read(int imageIndex,
ImageReadParam param) |
RenderedImage |
readAsRenderedImage(int imageIndex,
ImageReadParam param) |
boolean |
readerSupportsThumbnails() |
Raster |
readRaster(int imageIndex,
ImageReadParam param) |
BufferedImage |
readThumbnail(int imageIndex,
int thumbnailIndex) |
protected void |
resetMembers() |
void |
setInput(Object input,
boolean seekForwardOnly,
boolean ignoreMetadata) |
protected static void |
showIt(BufferedImage pImage,
String pTitle) |
assertInput, checkBounds, fakeAOI, fakeSubsampling, getDestination, hasExplicitDestination, resetabortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getDefaultReadParam, getImageMetadata, getInput, getLocale, getMinIndex, getOriginatingProvider, getSourceRegion, getStreamMetadata, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, read, readAll, readAll, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocaleprotected JPEGImageReader(ImageReaderSpi provider, ImageReader delegate)
protected void resetMembers()
resetMembers in class ImageReaderBasepublic void dispose()
dispose in class ImageReaderBasepublic String getFormatName() throws IOException
getFormatName in class ImageReaderIOExceptionpublic int getNumImages(boolean allowSearch)
throws IOException
getNumImages in class ImageReaderBaseIOExceptionpublic int getWidth(int imageIndex)
throws IOException
getWidth in class ImageReaderIOExceptionpublic int getHeight(int imageIndex)
throws IOException
getHeight in class ImageReaderIOExceptionpublic Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) throws IOException
getImageTypes in class ImageReaderIOExceptionpublic ImageTypeSpecifier getRawImageType(int imageIndex) throws IOException
getRawImageType in class ImageReaderIOExceptionpublic void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
setInput in class ImageReaderBasepublic boolean isRandomAccessEasy(int imageIndex)
throws IOException
isRandomAccessEasy in class ImageReaderIOExceptionpublic BufferedImage read(int imageIndex, ImageReadParam param) throws IOException
read in class ImageReaderIOExceptionprotected ICC_Profile ensureDisplayProfile(ICC_Profile profile)
protected ICC_Profile getEmbeddedICCProfile(boolean allowBadIndexes) throws IOException
IOExceptionpublic boolean canReadRaster()
canReadRaster in class ImageReaderpublic Raster readRaster(int imageIndex, ImageReadParam param) throws IOException
readRaster in class ImageReaderIOExceptionpublic RenderedImage readAsRenderedImage(int imageIndex, ImageReadParam param) throws IOException
readAsRenderedImage in class ImageReaderIOExceptionpublic void abort()
abort in class ImageReaderpublic boolean readerSupportsThumbnails()
readerSupportsThumbnails in class ImageReaderpublic int getNumThumbnails(int imageIndex)
throws IOException
getNumThumbnails in class ImageReaderIOExceptionpublic int getThumbnailWidth(int imageIndex,
int thumbnailIndex)
throws IOException
getThumbnailWidth in class ImageReaderIOExceptionpublic int getThumbnailHeight(int imageIndex,
int thumbnailIndex)
throws IOException
getThumbnailHeight in class ImageReaderIOExceptionpublic BufferedImage readThumbnail(int imageIndex, int thumbnailIndex) throws IOException
readThumbnail in class ImageReaderIOExceptionpublic IIOMetadata getImageMetadata(int imageIndex) throws IOException
getImageMetadata in class ImageReaderBaseIOExceptionpublic IIOMetadata getStreamMetadata() throws IOException
getStreamMetadata in class ImageReaderBaseIOExceptionprotected void processWarningOccurred(String warning)
processWarningOccurred in class ImageReaderprotected static void showIt(BufferedImage pImage, String pTitle)
public static void main(String[] args) throws IOException
IOExceptionCopyright © 2015. All Rights Reserved.