Enum Class Image.Format

java.lang.Object
java.lang.Enum<Image.Format>
discord4j.rest.util.Image.Format
All Implemented Interfaces:
Serializable, Comparable<Image.Format>, Constable
Enclosing class:
Image

public static enum Image.Format extends Enum<Image.Format>
The format of an image. This enum represents all the types supported by Discord.
See Also:
  • Enum Constant Details

    • UNKNOWN

      public static final Image.Format UNKNOWN
      Unknown image format.
    • JPEG

      public static final Image.Format JPEG
      Represents the Joint Photographic Experts Group format.
    • PNG

      public static final Image.Format PNG
      Represents the Portable Network Graphics format.
    • WEB_P

      public static final Image.Format WEB_P
      Represents the WebP format.
    • GIF

      public static final Image.Format GIF
      Represents the Graphics Interchange Format format.
    • LOTTIE

      public static final Image.Format LOTTIE
      Represents the Lottie format.
  • Method Details

    • values

      public static Image.Format[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Image.Format valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getExtension

      public String getExtension()
      Gets the file extension associated with this format.
      Returns:
      The file extension associated with this format.