public static enum Scalr.Mode extends java.lang.Enum<Scalr.Mode>
Enum Constant and Description |
---|
AUTOMATIC
Used to indicate that the scaling implementation should calculate
dimensions for the resultant image by looking at the image's
orientation and generating proportional dimensions that best fit into
the target width and height given
See "Image Proportions" in the
Scalr class description for
more detail. |
BEST_FIT_BOTH
Used to indicate that the scaling implementation should calculate
dimensions for the largest image that fit within the bounding box,
without cropping or distortion, retaining the original proportions.
|
FIT_EXACT
Used to fit the image to the exact dimensions given regardless of the
image's proportions.
|
FIT_TO_HEIGHT
Used to indicate that the scaling implementation should calculate
dimensions for the resultant image that best-fit within the given
height, regardless of the orientation of the image.
|
FIT_TO_WIDTH
Used to indicate that the scaling implementation should calculate
dimensions for the resultant image that best-fit within the given
width, regardless of the orientation of the image.
|
Modifier and Type | Method and Description |
---|---|
static Scalr.Mode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Scalr.Mode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Scalr.Mode AUTOMATIC
Scalr
class description for
more detail.public static final Scalr.Mode FIT_EXACT
FIT_TO
modes or AUTOMATIC
if you want the image to look
correct, but if dimension-fitting is the #1 priority regardless of
how it makes the image look, that is what this mode is for.public static final Scalr.Mode BEST_FIT_BOTH
public static final Scalr.Mode FIT_TO_WIDTH
public static final Scalr.Mode FIT_TO_HEIGHT
public static Scalr.Mode[] values()
for (Scalr.Mode c : Scalr.Mode.values()) System.out.println(c);
public static Scalr.Mode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null