|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<Configurations>
net.coobird.thumbnailator.util.Configurations
public enum Configurations
This enum lists properties that affect the behavior of Thumbnailator. Most are used for enabling or disabling workarounds.
System.getProperty(String), therefore, can be set
via the -D options when invoking the JVM.
Alternatively, they can be included in thumbnailator.properties
on the classpath (of the current thread's class loader.)
| Enum Constant Summary | |
|---|---|
CONSERVE_MEMORY_WORKAROUND
Enable a workaround to conserve memory when handling large image files. |
|
DEBUG_LOG
Enable debug logging to standard error. |
|
DEBUG_LOG_EXIF_WORKAROUND
Enable debug logging (to standard error) specifically for the Exif workaround. |
|
DISABLE_EXIF_WORKAROUND
Disables the Exif workaround. |
|
| Method Summary | |
|---|---|
boolean |
getBoolean()
Returns whether the specified configuration is enabled or not. |
static Configurations |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Configurations[] |
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 Configurations DISABLE_EXIF_WORKAROUND
thumbnailator.disableExifWorkaround
The default JPEG reader bundled with the JRE cannot handle JPEG images that doesn't have a JFIF APP0 marker segment as the first one. Some JPEG images have Exif (APP1) as the first one.
A workaround was introduced to resolve issue #108 by capturing the Exif data from the bitstream rather than relying on the JPEG reader.
Disabling this workaround will prevent Thumbnailator from properly identifying the image orientation of JPEG images which have Exif as the first marker. Therefore, unless the default behavior causes issues, disabling this workaround is not recommended.
public static final Configurations DEBUG_LOG
thumbnailator.debugLog
public static final Configurations DEBUG_LOG_EXIF_WORKAROUND
Exif workaround.
thumbnailator.debugLog.exifWorkaround
public static final Configurations CONSERVE_MEMORY_WORKAROUND
It is known that OutOfMemoryErrors can occur when handling
large images in Thumbnailator.
To fundamentally address the issue requires some dramatic design changes
to the core parts of Thumbnailator which would take some time and would
affect many internal parts of the library.
Such changes would take time before being implemented, a workaround has
been implemented in Thumbnailator 0.4.8 to reduce the likeliness of
OutOfMemoryErrors.
The workaround is not enabled by default, as it can negatively affect
the quality of the final image. It has also not been extensively
tested and will not necessarily prevent OutOfMemoryErrors.
When the workaround enabled, a smaller version of the source image will be used to reduce memory usage, under the following conditions:
| Method Detail |
|---|
public static final Configurations[] values()
for(Configurations c : Configurations.values())
System.out.println(c);
public static Configurations valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified namepublic boolean getBoolean()
true if the configuration is enabled, false
otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||