Enum ImageUtils.ScalingStrategy
- java.lang.Object
-
- java.lang.Enum<ImageUtils.ScalingStrategy>
-
- org.hippoecm.frontend.plugins.gallery.imageutil.ImageUtils.ScalingStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<ImageUtils.ScalingStrategy>
- Enclosing class:
- ImageUtils
public static enum ImageUtils.ScalingStrategy extends Enum<ImageUtils.ScalingStrategy>
The available strategies for scaling images.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTO
Automatically determine the best strategy to get the nicest looking image in the least amount of time.BEST_QUALITY
Do everything possible to make the scaled image exceptionally good, regardless of the processing time needed.QUALITY
Create a nice scaled version of an image at the cost of more processing time.SPEED
Scale as fast as possible.SPEED_AND_QUALITY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImageUtils.ScalingStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static ImageUtils.ScalingStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AUTO
public static final ImageUtils.ScalingStrategy AUTO
Automatically determine the best strategy to get the nicest looking image in the least amount of time.
-
SPEED
public static final ImageUtils.ScalingStrategy SPEED
Scale as fast as possible. For smaller images (800px in size) this can result in noticeable aliasing but it can be a few order of magnitudes faster than using theQUALITY
method.
-
SPEED_AND_QUALITY
public static final ImageUtils.ScalingStrategy SPEED_AND_QUALITY
-
QUALITY
public static final ImageUtils.ScalingStrategy QUALITY
Create a nice scaled version of an image at the cost of more processing time. This strategy is most important for smaller pictures (800px or smaller) and less important for larger pictures, as the difference between this strategy and theSPEED
strategy become less and less noticeable as the source-image size increases.
-
BEST_QUALITY
public static final ImageUtils.ScalingStrategy BEST_QUALITY
Do everything possible to make the scaled image exceptionally good, regardless of the processing time needed. Use this strategy when even @{link #QUALITY} results in bad-looking images.
-
-
Method Detail
-
values
public static ImageUtils.ScalingStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ImageUtils.ScalingStrategy c : ImageUtils.ScalingStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ImageUtils.ScalingStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum 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 constant with the specified nameNullPointerException
- if the argument is null
-
-