@Immutable
public class ResizeRequirement
extends java.lang.Object
A resize requirement will never affect the aspect ratio of an image and will never upscale an image.
| Modifier and Type | Class and Description |
|---|---|
static class |
ResizeRequirement.Mode
Defines the strictness of the resize requirement in accepting values other than the specified
target size.
|
| Modifier and Type | Field and Description |
|---|---|
ResizeRequirement.Mode |
mode
The mode to resize the image with.
|
ImageSize |
targetSize
The target size to resize the image to.
|
| Constructor and Description |
|---|
ResizeRequirement(ResizeRequirement.Mode mode,
ImageSize targetSize)
Creates new resize requirement.
|
ResizeRequirement(ResizeRequirement.Mode mode,
int sideLength)
Creates new resize requirement for a square target size.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.String |
toString() |
public final ResizeRequirement.Mode mode
public final ImageSize targetSize
public ResizeRequirement(ResizeRequirement.Mode mode, ImageSize targetSize)
mode - Defines the strictness of the resize requirement in accepting values other than the
specified target size.targetSize - The target size to resize the image to.public ResizeRequirement(ResizeRequirement.Mode mode, int sideLength)
mode - Defines the strictness of the resize requirement in accepting values other than the
specified target size.sideLength - The target size length