org.imgscalr
Enum Scalr.Method

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

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

Used to define the different scaling hints that the algorithm can use.

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


Enum Constant Summary
AUTOMATIC
          Used to indicate that the scaling implementation should decide which method to use in order to get the best looking scaled image in the least amount of time.
BALANCED
          Used to indicate that the scaling implementation should use a scaling operation balanced between SPEED and QUALITY.
QUALITY
          Used to indicate that the scaling implementation should do everything it can to create as nice of a result as possible.
SPEED
          Used to indicate that the scaling implementation should scale as fast as possible and return a result.
ULTRA_QUALITY
          Used to indicate that the scaling implementation should go above and beyond the work done by QUALITY to make the image look exceptionally good at the cost of more processing time.
 
Method Summary
static Scalr.MethodvalueOf(String name)
          Returns the enum constant of this type with the specified name.
static Scalr.Method[]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.Method AUTOMATIC
Used to indicate that the scaling implementation should decide which method to use in order to get the best looking scaled image in the least amount of time.

The scaling algorithm will use the Scalr.THRESHOLD_QUALITY_BALANCED or Scalr.THRESHOLD_BALANCED_SPEED thresholds as cut-offs to decide between selecting the QUALITY, BALANCED or SPEED scaling algorithms.

By default the thresholds chosen will give nearly the best looking result in the fastest amount of time. We intend this method to work for 80% of people looking to scale an image quickly and get a good looking result.


SPEED

public static final Scalr.Method SPEED
Used to indicate that the scaling implementation should scale as fast as possible and return a result. For smaller images (800px in size) this can result in noticeable aliasing but it can be a few magnitudes times faster than using the QUALITY method.


BALANCED

public static final Scalr.Method BALANCED
Used to indicate that the scaling implementation should use a scaling operation balanced between SPEED and QUALITY. Sometimes SPEED looks too low quality to be useful (e.g. text can become unreadable when scaled using SPEED) but using QUALITY mode will increase the processing time too much. This mode provides a "better than SPEED" quality in a "less than QUALITY" amount of time.


QUALITY

public static final Scalr.Method QUALITY
Used to indicate that the scaling implementation should do everything it can to create as nice of a result as possible. This approach is most important for smaller pictures (800px or smaller) and less important for larger pictures as the difference between this method and the SPEED method become less and less noticeable as the source-image size increases. Using the AUTOMATIC method will automatically prefer the QUALITY method when scaling an image down below 800px in size.


ULTRA_QUALITY

public static final Scalr.Method ULTRA_QUALITY
Used to indicate that the scaling implementation should go above and beyond the work done by QUALITY to make the image look exceptionally good at the cost of more processing time. This is especially evident when generating thumbnails of images that look jagged with some of the other Scalr.Methods (even QUALITY).

Method Detail

values

public static Scalr.Method[] 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.Method c : Scalr.Method.values())    System.out.println(c);

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

valueOf

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