Class CropOption

    • Method Detail

      • crop

        public static CropOption crop​(int width,
                                      int height)
        Creates a new option of cropping from the specified width and height in pixels.
        Parameters:
        width - the width of crop in pixels.
        height - the height of crop in pixels.
        Returns:
        an instance of CropOption type.
      • withOffset

        public CropOption withOffset​(int offsetX,
                                     int offsetY)
        Indicating the offset from which the crop MUST be performed. The offset is computed from top left of the image.

        By default, offset is [0,0] coordinate.

        Parameters:
        offsetX - an integer on the horizontal axis.
        offsetY - an integer on the vertical axis.
        Returns:
        the CropOption instance.
      • keepPartsAroundCroppedZone

        public CropOption keepPartsAroundCroppedZone()
        By default, on a crop operation the parts of image around the cropped zone is removed. In the case these parts are needed, just call this method.
        Returns:
        the CropOption instance.
      • getWidth

        public Integer getWidth()
      • getHeight

        public Integer getHeight()
      • getOffsetX

        public Integer getOffsetX()
      • getOffsetY

        public Integer getOffsetY()
      • mustRemovePartsAroundCroppedZone

        public boolean mustRemovePartsAroundCroppedZone()