Class ThumbnailParameter
- java.lang.Object
-
- net.coobird.thumbnailator.ThumbnailParameter
-
public class ThumbnailParameter extends java.lang.ObjectThis class is used to specify the parameters to use when creating a thumbnail.An instance of
ThumbnailParameteris mutable -- it should not be reused for multiple resizes, as the parameters can change behind the scenes as the resizing process progresses.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_FORMAT_TYPEA constant used to denote that the output format type of the thumbnail should be the default type of the codec being used.static intDEFAULT_IMAGE_TYPEA constant used to denote that the default image type should be used when creating the thumbnail.static floatDEFAULT_QUALITYA constant used to denote that the default compression quality settings should be used when creating the thumbnail.static java.lang.StringDETERMINE_FORMATA constant used to denote that the output format of the thumbnail should be the determined from available information such as the file name of the thumbnail.private java.util.List<ImageFilter>filtersImageFilters to apply to the thumbnail.private booleanfitWithinDimensionsWhether or not to fit the thumbnail within the specified dimensions.private doubleheightScalingFactorThe scaling factor to apply to the height when creating a thumbnail from the original image.private intimageTypeThe image type of theBufferedImageused for the thumbnail.private booleankeepAspectRatioIndicated whether or not the thumbnail should retain the aspect ratio the same as the original image when the aspect ratio of the desired dimensions for the thumbnail does not match the ratio of the original image.static java.lang.StringORIGINAL_FORMATA constant used to denote that the output format of the thumbnail should be the same as the format of the original image.static intORIGINAL_IMAGE_TYPEA constant used to denote that the image type of the original image should be used when creating the thumbnail.private java.lang.StringoutputFormatThe output format for the thumbnail.private java.lang.StringoutputFormatTypeThe output format type for the thumbnail.private floatoutputQualityThe output quality settings which will be used by the image compressor.private ResizerFactoryresizerFactoryTheResizerFactoryfor obtaining aResizerthat is to be used when performing an image resizing operation.private RegionsourceRegionThe region of the source image to use when creating a thumbnail.private java.awt.DimensionthumbnailSizeThe thumbnail size.private booleanuseExifOrientationWhether or not to use the Exif orientation metadata to orient the thumbnails.private doublewidthScalingFactorThe scaling factor to apply to the width when creating a thumbnail from the original image.
-
Constructor Summary
Constructors Modifier Constructor Description ThumbnailParameter(double widthScalingFactor, double heightScalingFactor, Region sourceRegion, boolean keepAspectRatio, java.lang.String outputFormat, java.lang.String outputFormatType, float outputQuality, int imageType, java.util.List<ImageFilter> filters, ResizerFactory resizerFactory, boolean fitWithinDimensions, boolean useExifOrientation)Creates an object holding the parameters needed in order to make a thumbnail.ThumbnailParameter(double widthScalingFactor, double heightScalingFactor, Region sourceRegion, boolean keepAspectRatio, java.lang.String outputFormat, java.lang.String outputFormatType, float outputQuality, int imageType, java.util.List<ImageFilter> filters, Resizer resizer, boolean fitWithinDimensions, boolean useExifOrientation)Creates an object holding the parameters needed in order to make a thumbnail.privateThumbnailParameter(java.awt.Dimension thumbnailSize, double widthScalingFactor, double heightScalingFactor, Region sourceRegion, boolean keepAspectRatio, java.lang.String outputFormat, java.lang.String outputFormatType, float outputQuality, int imageType, java.util.List<ImageFilter> filters, ResizerFactory resizerFactory, boolean fitWithinDimensions, boolean useExifOrientation)Private constructor which sets all the required fields, and performs validation of the given arguments.ThumbnailParameter(java.awt.Dimension thumbnailSize, Region sourceRegion, boolean keepAspectRatio, java.lang.String outputFormat, java.lang.String outputFormatType, float outputQuality, int imageType, java.util.List<ImageFilter> filters, ResizerFactory resizerFactory, boolean fitWithinDimensions, boolean useExifOrientation)Creates an object holding the parameters needed in order to make a thumbnail.ThumbnailParameter(java.awt.Dimension thumbnailSize, Region sourceRegion, boolean keepAspectRatio, java.lang.String outputFormat, java.lang.String outputFormatType, float outputQuality, int imageType, java.util.List<ImageFilter> filters, Resizer resizer, boolean fitWithinDimensions, boolean useExifOrientation)Creates an object holding the parameters needed in order to make a thumbnail.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanfitWithinDimenions()Returns whether or not to fit the thumbnail within the specified dimensions.doublegetHeightScalingFactor()Returns the scaling factor to apply to the height when creating the thumbnail.java.util.List<ImageFilter>getImageFilters()Returns the list ofImageFilters which are applied to the thumbnail.java.lang.StringgetOutputFormat()Returns the output format for the thumbnail.java.lang.StringgetOutputFormatType()Returns the output format type for the thumbnail.floatgetOutputQuality()Returns the compression quality settings for the thumbnail.ResizergetResizer()Returns the defaultResizerthat will be used when performing the resizing operation to create a thumbnail.ResizerFactorygetResizerFactory()Returns theResizerFactoryfor obtaining aResizerwhich is to be used when performing the resizing operation to create a thumbnail.java.awt.DimensiongetSize()Returns the size of the thumbnail.RegiongetSourceRegion()Returns the region of the source image to use when creating a thumbnail, represented by aRegionobject.intgetType()Returns the type of image.doublegetWidthScalingFactor()Returns the scaling factor to apply to the width when creating the thumbnail.booleanisKeepAspectRatio()Returns whether or not the thumbnail is to maintain the aspect ratio of the source image when creating the thumbnail.booleanuseExifOrientation()Returns whether or not the Exif metadata should be used to determine the orientation of the thumbnail.booleanuseOriginalImageType()Returns whether or not the original image type should be used for the thumbnail.private voidvalidateScalingFactor()Perform validations on thescalingFactorfield.private voidvalidateThumbnailSize()Perform validations on thethumbnailSizefield.
-
-
-
Field Detail
-
ORIGINAL_FORMAT
public static final java.lang.String ORIGINAL_FORMAT
A constant used to denote that the output format of the thumbnail should be the same as the format of the original image.
-
DETERMINE_FORMAT
public static final java.lang.String DETERMINE_FORMAT
A constant used to denote that the output format of the thumbnail should be the determined from available information such as the file name of the thumbnail.If a suitable output format cannot be determined, then the implementation should behave as if
ORIGINAL_FORMATwas specified.- See Also:
- Constant Field Values
-
DEFAULT_FORMAT_TYPE
public static final java.lang.String DEFAULT_FORMAT_TYPE
A constant used to denote that the output format type of the thumbnail should be the default type of the codec being used.
-
DEFAULT_QUALITY
public static final float DEFAULT_QUALITY
A constant used to denote that the default compression quality settings should be used when creating the thumbnail.- See Also:
- Constant Field Values
-
ORIGINAL_IMAGE_TYPE
public static final int ORIGINAL_IMAGE_TYPE
A constant used to denote that the image type of the original image should be used when creating the thumbnail.- See Also:
- Constant Field Values
-
DEFAULT_IMAGE_TYPE
public static final int DEFAULT_IMAGE_TYPE
A constant used to denote that the default image type should be used when creating the thumbnail.- See Also:
- Constant Field Values
-
thumbnailSize
private final java.awt.Dimension thumbnailSize
The thumbnail size.If this field is set, then the
#scalingFactorfield will be set asDouble.NaNto indicate that it is not set.
-
widthScalingFactor
private final double widthScalingFactor
The scaling factor to apply to the width when creating a thumbnail from the original image.If this field is set, then the
thumbnailSizefield will be set asnullto indicate that it is not set.
-
heightScalingFactor
private final double heightScalingFactor
The scaling factor to apply to the height when creating a thumbnail from the original image.If this field is set, then the
thumbnailSizefield will be set asnullto indicate that it is not set.
-
keepAspectRatio
private final boolean keepAspectRatio
Indicated whether or not the thumbnail should retain the aspect ratio the same as the original image when the aspect ratio of the desired dimensions for the thumbnail does not match the ratio of the original image.
-
outputFormat
private final java.lang.String outputFormat
The output format for the thumbnail.A value of
ORIGINAL_FORMATindicates that the image format of the original image should be used as the output format.A value of
DETERMINE_FORMATindicates that the output format of the thumbnail should be the determined from the information available, such as the output file name of the thumbnail.
-
outputFormatType
private final java.lang.String outputFormatType
The output format type for the thumbnail.A value of
DEFAULT_FORMAT_TYPEindicates that the default type of the specified compression format should be used as the output format type.
-
outputQuality
private final float outputQuality
The output quality settings which will be used by the image compressor.An acceptable value is in the range of
0.0fto1.0f, where0.0fis for the lowest quality setting and1.0ffor the highest quality setting.A value of
Float.NaNindicates that the default quality settings of the output codec should be used.
-
imageType
private final int imageType
The image type of theBufferedImageused for the thumbnail.
-
filters
private final java.util.List<ImageFilter> filters
ImageFilters to apply to the thumbnail.The filters will be applied after the original image has been resized.
-
resizerFactory
private final ResizerFactory resizerFactory
TheResizerFactoryfor obtaining aResizerthat is to be used when performing an image resizing operation.
-
sourceRegion
private final Region sourceRegion
The region of the source image to use when creating a thumbnail.A value of
nullrepresents that the entire source image should be used to create the thumbnail.
-
fitWithinDimensions
private final boolean fitWithinDimensions
Whether or not to fit the thumbnail within the specified dimensions.If
trueis specified, then the thumbnail will be sized to fit within the specified dimensions, if the thumbnail is going to exceed those dimensions.
-
useExifOrientation
private final boolean useExifOrientation
Whether or not to use the Exif orientation metadata to orient the thumbnails.
-
-
Constructor Detail
-
ThumbnailParameter
private ThumbnailParameter(java.awt.Dimension thumbnailSize, double widthScalingFactor, double heightScalingFactor, Region sourceRegion, boolean keepAspectRatio, java.lang.String outputFormat, java.lang.String outputFormatType, float outputQuality, int imageType, java.util.List<ImageFilter> filters, ResizerFactory resizerFactory, boolean fitWithinDimensions, boolean useExifOrientation)Private constructor which sets all the required fields, and performs validation of the given arguments.This constructor is to be called from all the public constructors.
- Parameters:
thumbnailSize- The size of the thumbnail to generate.widthScalingFactor- The scaling factor to apply to the width when creating a thumbnail from the original image.heightScalingFactor- The scaling factor to apply to the height when creating a thumbnail from the original image.sourceRegion- The region of the source image to use when creating a thumbnail. A value ofnullindicates that the entire source image should be used to create the thumbnail.keepAspectRatio- Indicates whether or not the thumbnail should maintain the aspect ratio of the original image.outputFormat- A string indicating the compression format that should be applied on the thumbnail. A value ofORIGINAL_FORMATshould be provided if the same image format as the original should be used for the thumbnail. A value ofDETERMINE_FORMATshould be provided if the output format of the thumbnail should be the determined from the information available, such as the output file name of the thumbnail.outputFormatType- A string indicating the compression type that should be used when writing the thumbnail. A value ofDEFAULT_FORMAT_TYPEshould be provided if the thumbnail should be written using the default compression type of the codec specified inoutputFormat.outputQuality- A value from0.0fto1.0fwhich indicates the quality setting to use for the compression of the thumbnail.0.0findicates the lowest quality,1.0findicates the highest quality setting for the compression.DEFAULT_QUALITYshould be specified when the codec's default compression quality settings should be used.imageType- TheBufferedImageimage type of the thumbnail. A value ofDEFAULT_IMAGE_TYPEshould be specified when the default image type should be used when creating the thumbnail.filters- TheImageFilters to apply to the thumbnail. A value ofnullwill be recognized as no filters are to be applied. The filters are applied after the original image has been resized.resizerFactory- TheResizerFactoryfor obtaining aResizerthat is to be used when performing an image resizing operation.fitWithinDimensions- Whether or not to fit the thumbnail within the specified dimensions.If
trueis specified, then the thumbnail will be sized to fit within the specified dimensions, if the thumbnail is going to exceed those dimensions.useExifOrientation- Whether or not to use the Exif metadata to determine the orientation of the thumbnail.If
trueis specified, then the Exif metadata will be used to determine the orientation of the thumbnail.- Throws:
java.lang.IllegalArgumentException- If the scaling factor is not a rational number or is less than or equal to 0, or if theResizerFactoryis null.
-
ThumbnailParameter
public ThumbnailParameter(java.awt.Dimension thumbnailSize, Region sourceRegion, boolean keepAspectRatio, java.lang.String outputFormat, java.lang.String outputFormatType, float outputQuality, int imageType, java.util.List<ImageFilter> filters, Resizer resizer, boolean fitWithinDimensions, boolean useExifOrientation)Creates an object holding the parameters needed in order to make a thumbnail.- Parameters:
thumbnailSize- The size of the thumbnail to generate.sourceRegion- The region of the source image to use when creating a thumbnail. A value ofnullindicates that the entire source image should be used to create the thumbnail.keepAspectRatio- Indicates whether or not the thumbnail should maintain the aspect ratio of the original image.outputFormat- A string indicating the compression format that should be applied on the thumbnail. A value ofORIGINAL_FORMATshould be provided if the same image format as the original should be used for the thumbnail. A value ofDETERMINE_FORMATshould be provided if the output format of the thumbnail should be the determined from the information available, such as the output file name of the thumbnail.outputFormatType- A string indicating the compression type that should be used when writing the thumbnail. A value ofDEFAULT_FORMAT_TYPEshould be provided if the thumbnail should be written using the default compression type of the codec specified inoutputFormat.outputQuality- A value from0.0fto1.0fwhich indicates the quality setting to use for the compression of the thumbnail.0.0findicates the lowest quality,1.0findicates the highest quality setting for the compression.DEFAULT_QUALITYshould be specified when the codec's default compression quality settings should be used.imageType- TheBufferedImageimage type of the thumbnail. A value ofDEFAULT_IMAGE_TYPEshould be specified when the default image type should be used when creating the thumbnail.filters- TheImageFilters to apply to the thumbnail. A value ofnullwill be recognized as no filters are to be applied. The filters are applied after the original image has been resized.resizer- TheResizerto use when performing the resizing operation to create a thumbnail.fitWithinDimensions- Whether or not to fit the thumbnail within the specified dimensions.If
trueis specified, then the thumbnail will be sized to fit within the specified dimensions, if the thumbnail is going to exceed those dimensions.useExifOrientation- Whether or not to use the Exif metadata to determine the orientation of the thumbnail.If
trueis specified, then the Exif metadata will be used to determine the orientation of the thumbnail.- Throws:
java.lang.IllegalArgumentException- If size isnullor if the dimensions are negative, or if theResizeris null.- Since:
- 0.4.3
-
ThumbnailParameter
public ThumbnailParameter(double widthScalingFactor, double heightScalingFactor, Region sourceRegion, boolean keepAspectRatio, java.lang.String outputFormat, java.lang.String outputFormatType, float outputQuality, int imageType, java.util.List<ImageFilter> filters, Resizer resizer, boolean fitWithinDimensions, boolean useExifOrientation)Creates an object holding the parameters needed in order to make a thumbnail.- Parameters:
widthScalingFactor- The scaling factor to apply to the width when creating a thumbnail from the original image.heightScalingFactor- The scaling factor to apply to the height when creating a thumbnail from the original image.sourceRegion- The region of the source image to use when creating a thumbnail. A value ofnullindicates that the entire source image should be used to create the thumbnail.keepAspectRatio- Indicates whether or not the thumbnail should maintain the aspect ratio of the original image.outputFormat- A string indicating the compression format that should be applied on the thumbnail. A value ofORIGINAL_FORMATshould be provided if the same image format as the original should be used for the thumbnail. A value ofDETERMINE_FORMATshould be provided if the output format of the thumbnail should be the determined from the information available, such as the output file name of the thumbnail.outputFormatType- A string indicating the compression type that should be used when writing the thumbnail. A value ofDEFAULT_FORMAT_TYPEshould be provided if the thumbnail should be written using the default compression type of the codec specified inoutputFormat.outputQuality- A value from0.0fto1.0fwhich indicates the quality setting to use for the compression of the thumbnail.0.0findicates the lowest quality,1.0findicates the highest quality setting for the compression.DEFAULT_QUALITYshould be specified when the codec's default compression quality settings should be used.imageType- TheBufferedImageimage type of the thumbnail. A value ofDEFAULT_IMAGE_TYPEshould be specified when the default image type should be used when creating the thumbnail.filters- TheImageFilters to apply to the thumbnail. A value ofnullwill be recognized as no filters are to be applied. The filters are applied after the original image has been resized.resizer- TheResizerto use when performing the resizing operation to create a thumbnail.fitWithinDimensions- Whether or not to fit the thumbnail within the specified dimensions.If
trueis specified, then the thumbnail will be sized to fit within the specified dimensions, if the thumbnail is going to exceed those dimensions.useExifOrientation- Whether or not to use the Exif metadata to determine the orientation of the thumbnail.If
trueis specified, then the Exif metadata will be used to determine the orientation of the thumbnail.- Throws:
java.lang.IllegalArgumentException- If the scaling factor is not a rational number or is less than or equal to 0, or if theResizeris null.- Since:
- 0.4.3
-
ThumbnailParameter
public ThumbnailParameter(java.awt.Dimension thumbnailSize, Region sourceRegion, boolean keepAspectRatio, java.lang.String outputFormat, java.lang.String outputFormatType, float outputQuality, int imageType, java.util.List<ImageFilter> filters, ResizerFactory resizerFactory, boolean fitWithinDimensions, boolean useExifOrientation)Creates an object holding the parameters needed in order to make a thumbnail.- Parameters:
thumbnailSize- The size of the thumbnail to generate.sourceRegion- The region of the source image to use when creating a thumbnail. A value ofnullindicates that the entire source image should be used to create the thumbnail.keepAspectRatio- Indicates whether or not the thumbnail should maintain the aspect ratio of the original image.outputFormat- A string indicating the compression format that should be applied on the thumbnail. A value ofORIGINAL_FORMATshould be provided if the same image format as the original should be used for the thumbnail. A value ofDETERMINE_FORMATshould be provided if the output format of the thumbnail should be the determined from the information available, such as the output file name of the thumbnail.outputFormatType- A string indicating the compression type that should be used when writing the thumbnail. A value ofDEFAULT_FORMAT_TYPEshould be provided if the thumbnail should be written using the default compression type of the codec specified inoutputFormat.outputQuality- A value from0.0fto1.0fwhich indicates the quality setting to use for the compression of the thumbnail.0.0findicates the lowest quality,1.0findicates the highest quality setting for the compression.DEFAULT_QUALITYshould be specified when the codec's default compression quality settings should be used.imageType- TheBufferedImageimage type of the thumbnail. A value ofDEFAULT_IMAGE_TYPEshould be specified when the default image type should be used when creating the thumbnail.filters- TheImageFilters to apply to the thumbnail. A value ofnullwill be recognized as no filters are to be applied. The filters are applied after the original image has been resized.resizerFactory- TheResizerFactoryfor obtaining aResizerthat is to be used when performing an image resizing operation.fitWithinDimensions- Whether or not to fit the thumbnail within the specified dimensions.If
trueis specified, then the thumbnail will be sized to fit within the specified dimensions, if the thumbnail is going to exceed those dimensions.useExifOrientation- Whether or not to use the Exif metadata to determine the orientation of the thumbnail.If
trueis specified, then the Exif metadata will be used to determine the orientation of the thumbnail.- Throws:
java.lang.IllegalArgumentException- If size isnullor if the dimensions are negative, or if theResizerFactoryis null.- Since:
- 0.4.3
-
ThumbnailParameter
public ThumbnailParameter(double widthScalingFactor, double heightScalingFactor, Region sourceRegion, boolean keepAspectRatio, java.lang.String outputFormat, java.lang.String outputFormatType, float outputQuality, int imageType, java.util.List<ImageFilter> filters, ResizerFactory resizerFactory, boolean fitWithinDimensions, boolean useExifOrientation)Creates an object holding the parameters needed in order to make a thumbnail.- Parameters:
widthScalingFactor- The scaling factor to apply to the width when creating a thumbnail from the original image.heightScalingFactor- The scaling factor to apply to the height when creating a thumbnail from the original image.sourceRegion- The region of the source image to use when creating a thumbnail. A value ofnullindicates that the entire source image should be used to create the thumbnail.keepAspectRatio- Indicates whether or not the thumbnail should maintain the aspect ratio of the original image.outputFormat- A string indicating the compression format that should be applied on the thumbnail. A value ofORIGINAL_FORMATshould be provided if the same image format as the original should be used for the thumbnail. A value ofDETERMINE_FORMATshould be provided if the output format of the thumbnail should be the determined from the information available, such as the output file name of the thumbnail.outputFormatType- A string indicating the compression type that should be used when writing the thumbnail. A value ofDEFAULT_FORMAT_TYPEshould be provided if the thumbnail should be written using the default compression type of the codec specified inoutputFormat.outputQuality- A value from0.0fto1.0fwhich indicates the quality setting to use for the compression of the thumbnail.0.0findicates the lowest quality,1.0findicates the highest quality setting for the compression.DEFAULT_QUALITYshould be specified when the codec's default compression quality settings should be used.imageType- TheBufferedImageimage type of the thumbnail. A value ofDEFAULT_IMAGE_TYPEshould be specified when the default image type should be used when creating the thumbnail.filters- TheImageFilters to apply to the thumbnail. A value ofnullwill be recognized as no filters are to be applied. The filters are applied after the original image has been resized.resizerFactory- TheResizerFactoryfor obtaining aResizerthat is to be used when performing an image resizing operation.fitWithinDimensions- Whether or not to fit the thumbnail within the specified dimensions.If
trueis specified, then the thumbnail will be sized to fit within the specified dimensions, if the thumbnail is going to exceed those dimensions.useExifOrientation- Whether or not to use the Exif metadata to determine the orientation of the thumbnail.If
trueis specified, then the Exif metadata will be used to determine the orientation of the thumbnail.- Throws:
java.lang.IllegalArgumentException- If the scaling factor is not a rational number or is less than or equal to 0, or if theResizerFactoryis null.- Since:
- 0.4.3
-
-
Method Detail
-
validateThumbnailSize
private void validateThumbnailSize()
Perform validations on thethumbnailSizefield.
-
validateScalingFactor
private void validateScalingFactor()
Perform validations on thescalingFactorfield.
-
getSize
public java.awt.Dimension getSize()
Returns the size of the thumbnail.Returns
nullif the scaling factor is set rather than the explicit thumbnail size.- Returns:
- The size of the thumbnail.
-
getWidthScalingFactor
public double getWidthScalingFactor()
Returns the scaling factor to apply to the width when creating the thumbnail.Returns
Double.NaNif the thumbnail size is set rather than the scaling factor.- Returns:
- The width scaling factor for the thumbnail.
- Since:
- 0.3.10
-
getHeightScalingFactor
public double getHeightScalingFactor()
Returns the scaling factor to apply to the height when creating the thumbnail.Returns
Double.NaNif the thumbnail size is set rather than the scaling factor.- Returns:
- The height scaling factor for the thumbnail.
- Since:
- 0.3.10
-
getType
public int getType()
Returns the type of image. The value returned is the constant used for image types ofBufferedImage.- Returns:
- The type of the image.
-
isKeepAspectRatio
public boolean isKeepAspectRatio()
Returns whether or not the thumbnail is to maintain the aspect ratio of the source image when creating the thumbnail.- Returns:
trueif the thumbnail is to maintain the aspect ratio of the original image,falseotherwise.
-
getOutputFormat
public java.lang.String getOutputFormat()
Returns the output format for the thumbnail.If the output format is to use the same compression format as the original image, this method will return
ORIGINAL_FORMAT.If the output format should be determined from the information available such as the file name of the thumbnail, then this method will return
DETERMINE_FORMAT.- Returns:
- The output format for the thumbnail.
-
getOutputFormatType
public java.lang.String getOutputFormatType()
Returns the output format type for the thumbnail.If the default compression type of the compression format is to be used, then this method will return
DEFAULT_FORMAT_TYPE.- Returns:
- The output format type for the thumbnail.
-
getOutputQuality
public float getOutputQuality()
Returns the compression quality settings for the thumbnail.The value is in the range of
0.0fto1.0f, where0.0fis for the lowest quality setting and1.0ffor the highest quality setting.If the default compression quality is to be used, then this method will return
DEFAULT_QUALITY.- Returns:
- The compression quality settings for the thumbnail.
-
getImageFilters
public java.util.List<ImageFilter> getImageFilters()
Returns the list ofImageFilters which are applied to the thumbnail.These filters are applied after the original image has been resized.
- Returns:
- The
ImageFilters which are applied to the thumbnail.
-
getResizer
public Resizer getResizer()
Returns the defaultResizerthat will be used when performing the resizing operation to create a thumbnail.- Returns:
- The default
Resizerto use when performing a resize operation.
-
getResizerFactory
public ResizerFactory getResizerFactory()
Returns theResizerFactoryfor obtaining aResizerwhich is to be used when performing the resizing operation to create a thumbnail.- Returns:
- The
ResizerFactoryto use to obtain theResizer.
-
useOriginalImageType
public boolean useOriginalImageType()
Returns whether or not the original image type should be used for the thumbnail.- Returns:
trueif the original image type should be used,falseotherwise.
-
getSourceRegion
public Region getSourceRegion()
Returns the region of the source image to use when creating a thumbnail, represented by aRegionobject.- Returns:
- The
Regionobject representing the source region to use when creating a thumbnail.A value of
nullindicates that the entire source image should be used to create the thumbnail.
-
fitWithinDimenions
public boolean fitWithinDimenions()
Returns whether or not to fit the thumbnail within the specified dimensions.- Returns:
trueis returned when the thumbnail should be sized to fit within the specified dimensions, if the thumbnail is going to exceed those dimensions.- Since:
- 0.4.0
-
useExifOrientation
public boolean useExifOrientation()
Returns whether or not the Exif metadata should be used to determine the orientation of the thumbnail.- Returns:
trueis returned when the Exif metadata should be used to decide the orientation of the thumbnail,falseotherwise.- Since:
- 0.4.3
-
-