Class ImageSize

  • All Implemented Interfaces:
    Serializable

    public final class ImageSize
    extends Object
    implements Serializable
    Represents the width and height of an image file, i.e. a width and height in pixels.
    Since:
    8.3.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • ImageSize

        public ImageSize​(int width,
                         int height)
        Creates a new image size with the given width and height.
        Parameters:
        width - The width of the image, in pixels.
        height - The height of the image, in pixels.
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • height

        public int height()
        The height of the image, in pixels.
        Returns:
        The height of the image.
      • width

        public int width()
        The width of the image, in pixels.
        Returns:
        The width of the image.
      • zero

        public static ImageSize zero()
        Gets an image size for an image without pixels.
        Returns:
        An image size a 0x0 image.