public final class JPEGImageReader
extends com.twelvemonkeys.imageio.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)availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales| Modifier | Constructor | Description |
|---|---|---|
protected |
JPEGImageReader(ImageReaderSpi provider,
ImageReader delegate) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
abort() |
|
boolean |
canReadRaster() |
|
void |
dispose() |
|
ImageReadParam |
getDefaultReadParam() |
|
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) |
|
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) |
abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getImageMetadata, getInput, getLocale, getMinIndex, getOriginatingProvider, getSourceRegion, getStreamMetadata, 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, 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 com.twelvemonkeys.imageio.ImageReaderBasepublic void dispose()
dispose in class com.twelvemonkeys.imageio.ImageReaderBasepublic String getFormatName() throws IOException
getFormatName in class ImageReaderIOExceptionpublic 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 BufferedImage read(int imageIndex, ImageReadParam param) throws IOException
read in class ImageReaderIOExceptionpublic void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
setInput in class com.twelvemonkeys.imageio.ImageReaderBasepublic int getNumImages(boolean allowSearch)
throws IOException
getNumImages in class com.twelvemonkeys.imageio.ImageReaderBaseIOExceptionprotected 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 ImageReadParam getDefaultReadParam()
getDefaultReadParam 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 com.twelvemonkeys.imageio.ImageReaderBaseIOExceptionpublic IIOMetadata getStreamMetadata() throws IOException
getStreamMetadata in class com.twelvemonkeys.imageio.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 © 2018. All rights reserved.