public 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 and Description |
---|---|
protected |
JPEGImageReader(ImageReaderSpi provider,
ImageReader delegate) |
Modifier and Type | Method and Description |
---|---|
void |
abort() |
boolean |
canReadRaster() |
static void |
convertYCbCr2RGB(Raster raster) |
static void |
convertYCCK2CMYK(Raster raster) |
void |
dispose() |
protected ICC_Profile |
ensureDisplayProfile(ICC_Profile profile) |
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) |
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, reset
abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, 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, setLocale
protected JPEGImageReader(ImageReaderSpi provider, ImageReader delegate)
protected void resetMembers()
resetMembers
in class com.twelvemonkeys.imageio.ImageReaderBase
public void dispose()
dispose
in class com.twelvemonkeys.imageio.ImageReaderBase
public String getFormatName() throws IOException
getFormatName
in class ImageReader
IOException
public int getNumImages(boolean allowSearch) throws IOException
getNumImages
in class com.twelvemonkeys.imageio.ImageReaderBase
IOException
public int getWidth(int imageIndex) throws IOException
getWidth
in class ImageReader
IOException
public int getHeight(int imageIndex) throws IOException
getHeight
in class ImageReader
IOException
public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) throws IOException
getImageTypes
in class ImageReader
IOException
public ImageTypeSpecifier getRawImageType(int imageIndex) throws IOException
getRawImageType
in class ImageReader
IOException
public void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
setInput
in class com.twelvemonkeys.imageio.ImageReaderBase
public boolean isRandomAccessEasy(int imageIndex) throws IOException
isRandomAccessEasy
in class ImageReader
IOException
public BufferedImage read(int imageIndex, ImageReadParam param) throws IOException
read
in class ImageReader
IOException
protected ICC_Profile ensureDisplayProfile(ICC_Profile profile)
protected ICC_Profile getEmbeddedICCProfile(boolean allowBadIndexes) throws IOException
IOException
public boolean canReadRaster()
canReadRaster
in class ImageReader
public Raster readRaster(int imageIndex, ImageReadParam param) throws IOException
readRaster
in class ImageReader
IOException
public RenderedImage readAsRenderedImage(int imageIndex, ImageReadParam param) throws IOException
readAsRenderedImage
in class ImageReader
IOException
public void abort()
abort
in class ImageReader
public ImageReadParam getDefaultReadParam()
getDefaultReadParam
in class ImageReader
public boolean readerSupportsThumbnails()
readerSupportsThumbnails
in class ImageReader
public int getNumThumbnails(int imageIndex) throws IOException
getNumThumbnails
in class ImageReader
IOException
public int getThumbnailWidth(int imageIndex, int thumbnailIndex) throws IOException
getThumbnailWidth
in class ImageReader
IOException
public int getThumbnailHeight(int imageIndex, int thumbnailIndex) throws IOException
getThumbnailHeight
in class ImageReader
IOException
public BufferedImage readThumbnail(int imageIndex, int thumbnailIndex) throws IOException
readThumbnail
in class ImageReader
IOException
public IIOMetadata getImageMetadata(int imageIndex) throws IOException
getImageMetadata
in class com.twelvemonkeys.imageio.ImageReaderBase
IOException
public IIOMetadata getStreamMetadata() throws IOException
getStreamMetadata
in class com.twelvemonkeys.imageio.ImageReaderBase
IOException
protected void processWarningOccurred(String warning)
processWarningOccurred
in class ImageReader
public static void convertYCbCr2RGB(Raster raster)
public static void convertYCCK2CMYK(Raster raster)
protected static void showIt(BufferedImage pImage, String pTitle)
public static void main(String[] args) throws IOException
IOException
Copyright © 2017. All rights reserved.