Class ScalingParameters.Builder

    • Constructor Detail

      • 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 box
        height - the height of the bounding box
    • 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.
      • compressionQuality

        public ScalingParameters.Builder compressionQuality​(float compressionQuality)
        Sets the compression quality. When not set the default 1 is used.