public static class DecodeTask.DecodeOptions extends Object
Modifier and Type | Field and Description |
---|---|
int |
destH
The destination height to decode to.
|
int |
destW
The destination width to decode to.
|
float |
horizontalCenter
If the destination dimensions are smaller than the source image provided by the request
key, this will determine where horizontally the destination rect will be cropped from.
|
int |
sampleSizeStrategy
One of the STRATEGY constants.
|
static int |
STRATEGY_ROUND_NEAREST
Round sample size to the nearest power of 2.
|
static int |
STRATEGY_ROUND_UP
Always decode from a smaller region and scale up.
|
static int |
STRATEGY_TRUNCATE
Always decode from a bigger region and crop down.
|
float |
verticalCenter
If the destination dimensions are smaller than the source image provided by the request
key, this will determine where vertically the destination rect will be cropped from.
|
Constructor and Description |
---|
DecodeOptions(int destW,
int destH) |
DecodeOptions(int destW,
int destH,
float horizontalCenter,
float verticalCenter,
int sampleSizeStrategy)
Create new DecodeOptions.
|
DecodeOptions(int destW,
int destH,
float verticalCenter,
int sampleSizeStrategy)
Create new DecodeOptions with horizontally-centered cropping if applicable.
|
public static final int STRATEGY_ROUND_NEAREST
public static final int STRATEGY_TRUNCATE
public static final int STRATEGY_ROUND_UP
public int destW
public int destH
public float horizontalCenter
public float verticalCenter
public int sampleSizeStrategy
public DecodeOptions(int destW, int destH)
public DecodeOptions(int destW, int destH, float verticalCenter, int sampleSizeStrategy)
destW
- The destination width to decode to.destH
- The destination height to decode to.verticalCenter
- If the destination dimensions are smaller than the source image
provided by the request key, this will determine where vertically
the destination rect will be cropped from.sampleSizeStrategy
- One of the STRATEGY constants.public DecodeOptions(int destW, int destH, float horizontalCenter, float verticalCenter, int sampleSizeStrategy)
destW
- The destination width to decode to.destH
- The destination height to decode to.horizontalCenter
- If the destination dimensions are smaller than the source image
provided by the request key, this will determine where
horizontally the destination rect will be cropped from.verticalCenter
- If the destination dimensions are smaller than the source image
provided by the request key, this will determine where vertically
the destination rect will be cropped from.sampleSizeStrategy
- One of the STRATEGY constants.