org.imgscalr
Enum Scalr.Mode

java.lang.Object  extended by java.lang.Enum<Scalr.Mode>      extended by org.imgscalr.Scalr.Mode
All Implemented Interfaces:
Serializable, Comparable<Scalr.Mode>
Enclosing class:
Scalr

public static enum Scalr.Mode
extends Enum<Scalr.Mode>

Used to define the different modes of resizing that the algorithm can use.

Since:
3.1
Author:
Riyad Kalla (software@thebuzzmedia.com)


Enum Constant Summary
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.
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.
 
Method Summary
static Scalr.ModevalueOf(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, inthe order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUTOMATIC

public static final Scalr.Mode 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.


FIT_EXACT

public static final Scalr.Mode FIT_EXACT
Used to fit the image to the exact dimensions given regardless of the image's proportions. If the dimensions are not proportionally correct, this will introduce vertical or horizontal stretching to the image.

It is recommended that you use one of the other 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.


FIT_TO_WIDTH

public static final Scalr.Mode 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.


FIT_TO_HEIGHT

public static final Scalr.Mode 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.

Method Detail

values

public static Scalr.Mode[] values()
Returns an array containing the constants of this enum type, inthe order they are declared. This method may be used to iterateover the constants as follows:
for (Scalr.Mode c : Scalr.Mode.values())    System.out.println(c);

Returns:
an array containing the constants of this enum type, inthe order they are declared

valueOf

public static Scalr.Mode valueOf(String name)
Returns the enum constant of this type with the specified name.The string must match exactly an identifier used to declare anenum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constantwith the specified name
NullPointerException - if the argument is null


Copyright © 2012
The Buzz Media, LLC. All Rights Reserved.


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14