Class ScalingParameters.Builder
- java.lang.Object
-
- org.hippoecm.frontend.plugins.gallery.imageutil.ScalingParameters.Builder
-
- Enclosing class:
- ScalingParameters
public static class ScalingParameters.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder(int width, int height)
Creates a scaled version of an image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScalingParameters
build()
ScalingParameters.Builder
compressionQuality(float compressionQuality)
Sets the compression quality.ScalingParameters.Builder
cropping()
Sets cropping to true.ScalingParameters.Builder
strategy(ImageUtils.ScalingStrategy strategy)
Sets a scaling strategy.ScalingParameters.Builder
upscaling()
Sets upscaling to true.
-
-
-
Method Detail
-
upscaling
public ScalingParameters.Builder upscaling()
Sets upscaling to true. Images that are smaller than the variant configuration are scaled up.
-
cropping
public ScalingParameters.Builder cropping()
Sets cropping to true. The original is cropped to fill the variant dimensions. The upscaling setting is ignored, since cropping implies upscaling.
-
strategy
public ScalingParameters.Builder strategy(ImageUtils.ScalingStrategy strategy)
Sets a scaling strategy. When not set the defaultImageUtils.ScalingStrategy.QUALITY
is used.
-
compressionQuality
public ScalingParameters.Builder compressionQuality(float compressionQuality)
Sets the compression quality. When not set the default 1 is used.
-
build
public ScalingParameters build()
-
-