Class ImageSize

java.lang.Object
de.xima.fc.common.image.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:
  • Constructor Summary

    Constructors
    Constructor
    Description
    ImageSize(int width, int height)
    Creates a new image size with the given width and height.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    int
    The height of the image, in pixels.
    int
    The width of the image, in pixels.
    static ImageSize
    Gets an image size for an image without pixels.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • 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.