public class DecodeOptions extends Object
Modifier and Type | Field and Description |
---|---|
static DecodeOptions |
DEFAULT
Default decode options.
|
Constructor and Description |
---|
DecodeOptions()
Constructs an empty DecodeOptions instance
|
DecodeOptions(int subsampling)
Constructs an instance specifying the image should be decoded using subsampling.
|
DecodeOptions(int x,
int y,
int width,
int height)
Constructs an instance specifying the region of the image that should be decoded.
|
DecodeOptions(Rectangle sourceRegion)
Constructs an instance specifying the region of the image that should be decoded.
|
Modifier and Type | Method and Description |
---|---|
Rectangle |
getSourceRegion()
When decoding an image, the part of the image that should be decoded, or null if the entire
image is needed.
|
int |
getSubsamplingOffsetX()
When decoding an image, the horizontal offset for subsampling
|
int |
getSubsamplingOffsetY()
When decoding an image, the vertical offset for subsampling
|
int |
getSubsamplingX()
When decoding an image, the number of columns to advance in the source for every pixel
decoded.
|
int |
getSubsamplingY()
When decoding an image, the number of rows to advance in the source for every pixel decoded.
|
boolean |
isFilterSubsampled()
Flag used by the filter to specify if it performed subsampling.
|
void |
setSourceRegion(Rectangle sourceRegion)
Sets the region of the source image that should be decoded.
|
void |
setSubsamplingOffsetX(int ssOffsetX)
Sets the horizontal subsampling offset for decoding images
|
void |
setSubsamplingOffsetY(int ssOffsetY)
Sets the vertical subsampling offset for decoding images
|
void |
setSubsamplingX(int ssX)
Sets the number of columns to advance in the source for every pixel decoded
|
void |
setSubsamplingY(int ssY)
Sets the number of rows to advance in the source for every pixel decoded
|
public static final DecodeOptions DEFAULT
public DecodeOptions()
public DecodeOptions(Rectangle sourceRegion)
sourceRegion
- Region of the source image that should be decodedpublic DecodeOptions(int x, int y, int width, int height)
x
- x-coordinate of the top-left corner of the region to be decodedy
- y-coordinate of the top-left corner of the region to be decodedwidth
- Width of the region to be decodedheight
- Height of the region to be decodedpublic DecodeOptions(int subsampling)
subsampling
- The number of rows and columns to advance in the source for each pixel in
the decoded image.public Rectangle getSourceRegion()
public void setSourceRegion(Rectangle sourceRegion)
sourceRegion
- The source region to decode, or null if the entire image should be
decoded.public int getSubsamplingX()
public void setSubsamplingX(int ssX)
ssX
- The x-axis subsampling valuepublic int getSubsamplingY()
public void setSubsamplingY(int ssY)
ssY
- The y-axis subsampling valuepublic int getSubsamplingOffsetX()
public void setSubsamplingOffsetX(int ssOffsetX)
ssOffsetX
- The x-axis subsampling offsetpublic int getSubsamplingOffsetY()
public void setSubsamplingOffsetY(int ssOffsetY)
ssOffsetY
- The y-axis subsampling offsetpublic boolean isFilterSubsampled()
Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.