Class ScalingParameters.Builder
java.lang.Object
org.hippoecm.frontend.plugins.gallery.imageutil.ScalingParameters.Builder
- Enclosing class:
- ScalingParameters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
compressionQuality
(float compressionQuality) Sets the compression quality.cropping()
Sets cropping to true.strategy
(ImageUtils.ScalingStrategy strategy) Sets a scaling strategy.Sets upscaling to true.
-
Constructor Details
-
Builder
public Builder(int width, int height) Creates a scaled version of an image. The given scaling parameters define a bounding box with a certain width and height.- Parameters:
width
- the width of the bounding boxheight
- the height of the bounding box
-
-
Method Details
-
upscaling
Sets upscaling to true. Images that are smaller than the variant configuration are scaled up. -
cropping
Sets cropping to true. The original is cropped to fill the variant dimensions. The upscaling setting is ignored, since cropping implies upscaling. -
strategy
Sets a scaling strategy. When not set the defaultImageUtils.ScalingStrategy.QUALITY
is used. -
compressionQuality
Sets the compression quality. When not set the default 1 is used. -
build
-