Class DimensionOption

    • Method Detail

      • widthAndHeight

        public static DimensionOption widthAndHeight​(Integer width,
                                                     Integer height)
        Creates a new option on the dimension from the specified width and height in pixels.
        Parameters:
        width - the width in pixels. If null, the height will only be taken into account by ImageTool when resizing an image.
        height - the height in pixels. If null, the width will only be taken into account by ImageTool when resizing an image.
        Returns:
        an instance of DimensionOption type.
      • width

        public static DimensionOption width​(Integer width)
        Creates a new option on the dimension from the specified width in pixels. The height will be computed from the width to keep the same ratio than the original image.
        Parameters:
        width - the width in pixels.
        Returns:
        an instance of DimensionOption type.
      • height

        public static DimensionOption height​(Integer height)
        Creates a new option on the dimension from the specified height in pixels. The width will be computed from the height to keep the same ratio than the original image.
        Parameters:
        height - the height in pixels.
        Returns:
        an instance of DimensionOption type.
      • getWidth

        public Integer getWidth()
        Returns:
        the width
      • getHeight

        public Integer getHeight()
        Returns:
        the height