Class CropScaleImageThumbnailGenerator.Builder
java.lang.Object
de.xima.fc.common.image.CropScaleImageThumbnailGenerator.Builder
- Enclosing class:
CropScaleImageThumbnailGenerator
A builder for a thumbnail generator that scales down images to a defined width and height. Images that do not fit
the aspect ratio are cropped appropriately.
- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the thumbnail generator with the current configuration.defaultDimensions(int width, int height) Sets the desired default target width and height for the thumbnail.format(de.xima.cmn.utils.XImageUtils.EImageFormat format) Sets the desired format for the thumbnail.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Builds the thumbnail generator with the current configuration. Subsequent changes to the builder do not affect the generator.- Returns:
- The thumbnail generator.
-
defaultDimensions
Sets the desired default target width and height for the thumbnail. The image is scaled down to fit the dimensions. May be overwritten byconstraints.- Parameters:
width- The target width.height- The target height.- Returns:
- This builder for chaining method calls.
-
format
public CropScaleImageThumbnailGenerator.Builder format(de.xima.cmn.utils.XImageUtils.EImageFormat format) Sets the desired format for the thumbnail. Defaults to png.- Parameters:
format- The desired format.- Returns:
- This builder for chaining method calls.
-