FileDocCategorySizeDatePackage
ImageReadParam.javaAPI DocAndroid 1.5 API5850Wed May 06 22:41:54 BST 2009javax.imageio

ImageReadParam

public class ImageReadParam extends IIOParam
The ImageReadParam class provides information to the ImageReader about how an image is to be decoded.
since
Android 1.0

Fields Summary
protected boolean
canSetSourceRenderSize
This flag indicates if this ImageReadParam supports setting the source rendering size.
protected BufferedImage
destination
The destination BufferedImage.
protected int[]
destinationBands
The destination bands.
protected int
minProgressivePass
The minimum progressive pass.
protected int
numProgressivePasses
The number of progressive passes.
protected Dimension
sourceRenderSize
The source render size.
Constructors Summary
Methods Summary
public booleancanSetSourceRenderSize()
Returns true if this ImageReaderParam supports rendering a source image at an arbitrary size.

return
true, if this ImageReaderParam supports rendering a source image at an arbitrary size, false otherwise.

        return canSetSourceRenderSize;
    
public java.awt.image.BufferedImagegetDestination()
Gets the current destination image as BufferedImage.

return
the BufferedImage which represents the destination.

        return destination;
    
public int[]getDestinationBands()
Gets the indices of destination bands.

return
the array of destination bands.

        return destinationBands;
    
public intgetSourceMaxProgressivePass()
Gets the index of the maximum pass to be decoded. This method returns Integer.MAX_VALUE, if getSourceNumProgressivePasses() method returns value that is equal to Integer.MAX_VALUE. Otherwise this method returns getSourceMinProgressivePass() + getSourceNumProgressivePasses() - 1.

return
the index of the maximum pass to be decoded.

        if (getSourceNumProgressivePasses() == Integer.MAX_VALUE) {
            return Integer.MAX_VALUE;
        }
        return getSourceMinProgressivePass() + getSourceNumProgressivePasses() - 1;
    
public intgetSourceMinProgressivePass()
Gets the index of the minimum progressive pass that is decoded, default is 0.

return
the index of the minimum progressive pass that is decoded, default is 0.

        return minProgressivePass;
    
public intgetSourceNumProgressivePasses()
Gets the number of progressive passes. The default value is Integer.MAX_VALUE.

return
the number of progressive passes.

        return numProgressivePasses;
    
public java.awt.DimensiongetSourceRenderSize()
Gets the dimension of source image which will be rendered during decoding process.

return
the source render size.

        return sourceRenderSize;
    
public voidsetDestination(java.awt.image.BufferedImage destination)
Sets the specified destination image. This image will be used by read, readAll, and readRaster methods, and a reference to it will be returned by those methods.

param
destination the destination image.

        this.destination = destination;
    
public voidsetDestinationBands(int[] destinationBands)
Sets the indices of the destination bands.

param
destinationBands the indices of the destination bands.

        this.destinationBands = destinationBands;
    
public voidsetDestinationType(javax.imageio.ImageTypeSpecifier destinationType)

        this.destinationType = destinationType;
    
public voidsetSourceProgressivePasses(int minPass, int numPasses)
Sets the source progressive passes.

param
minPass the index of the minimum pass to be decoded.
param
numPasses the number of passes to be decoded.

        minProgressivePass = minPass;
        numProgressivePasses = numPasses;
    
public voidsetSourceRenderSize(java.awt.Dimension size)
Sets the dimension size of source image if an image can be rendered at an arbitrary size.

param
size the size of rendered image.
throws
UnsupportedOperationException the unsupported operation exception.

        if (!canSetSourceRenderSize) {
            throw new UnsupportedOperationException("can't set source renderer size");
        }
        sourceRenderSize = size;