|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<Resizers>
net.coobird.thumbnailator.resizers.Resizers
public enum Resizers
This enum can be used to select a specific Resizer in order
to perform a resizing operation.
The instance held by a value of this enum is a single instance. When using
specific implementations of Resizers, it is preferable to obtain
an instance of a Resizer through this enum or the
DefaultResizerFactory class in order to prevent many instances of the
Resizer class implementations from being instantiated.
Resizers enum
in order to resize an image using bilinear interpolation:
BufferedImage sourceImage = new BufferedImageBuilder(400, 400).build(); BufferedImage destImage = new BufferedImageBuilder(200, 200).build(); Resizers.BILINEAR.resize(sourceImage, destImage);
DefaultResizerFactory| Enum Constant Summary | |
|---|---|
BICUBIC
A Resizer which performs resizing operations using
bicubic interpolation. |
|
BILINEAR
A Resizer which performs resizing operations using
bilinear interpolation. |
|
NULL
A Resizer which does not perform resizing operations. |
|
PROGRESSIVE
A Resizer which performs resizing operations using
progressive bilinear scaling. |
|
| Method Summary | |
|---|---|
void |
resize(BufferedImage srcImage,
BufferedImage destImage)
Resizes an image. |
static Resizers |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Resizers[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
| Methods inherited from class java.lang.Enum |
|---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Resizers NULL
Resizer which does not perform resizing operations. The source
image will be drawn at the origin of the destination image.
public static final Resizers BILINEAR
Resizer which performs resizing operations using
bilinear interpolation.
public static final Resizers BICUBIC
Resizer which performs resizing operations using
bicubic interpolation.
public static final Resizers PROGRESSIVE
Resizer which performs resizing operations using
progressive bilinear scaling.
For details on this technique, refer to the documentation of the
ProgressiveBilinearResizer class.
| Method Detail |
|---|
public static final Resizers[] values()
for(Resizers c : Resizers.values())
System.out.println(c);
public static Resizers valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
public void resize(BufferedImage srcImage,
BufferedImage destImage)
ResizerThe source image is resized to fit the dimensions of the destination image and drawn.
resize in interface ResizersrcImage - The source image.destImage - The destination image.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||