Enum Class WebpFormat

java.lang.Object
java.lang.Enum<WebpFormat>
cloud.opencode.base.image.codec.webp.WebpFormat
All Implemented Interfaces:
Serializable, Comparable<WebpFormat>, Constable

public enum WebpFormat extends Enum<WebpFormat>
Pixel layout used by WebP encode/decode operations. WebP 编解码操作所使用的像素布局。

Each value pairs a logical pixel format with the number of bytes per pixel for tightly packed buffers (no padding, top-to-bottom).

每个枚举值都将逻辑像素格式与紧密排列缓冲区(无填充,自上而下)的每像素字节数关联。

Security | 安全性:

  • Thread-safe: Yes - immutable enum. - 线程安全: 是 - 不可变枚举。
Since:
JDK 25, opencode-base-image-codec V1.0.4
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Enum Constant Details

    • RGB

      public static final WebpFormat RGB
      RGB pixel data, 3 bytes per pixel. | RGB 像素数据,每像素 3 字节。
    • RGBA

      public static final WebpFormat RGBA
      RGBA pixel data, 4 bytes per pixel. | RGBA 像素数据,每像素 4 字节。
  • Method Details

    • values

      public static WebpFormat[] 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 WebpFormat 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
    • bytesPerPixel

      public int bytesPerPixel()
      Returns the byte count per pixel for this format. 返回此格式的每像素字节数。
      Returns:
      bytes per pixel | 每像素字节数