Enum Class PixelFormat

java.lang.Object
java.lang.Enum<PixelFormat>
org.wpilib.util.PixelFormat
All Implemented Interfaces:
Serializable, Comparable<PixelFormat>, Constable

public enum PixelFormat extends Enum<PixelFormat>
Image pixel format.
  • Enum Constant Details

    • UNKNOWN

      public static final PixelFormat UNKNOWN
      Unknown format.
    • MJPEG

      public static final PixelFormat MJPEG
      Motion-JPEG (compressed image data).
    • YUYV

      public static final PixelFormat YUYV
      YUY 4:2:2, 16 bpp.
    • RGB565

      public static final PixelFormat RGB565
      RGB 5-6-5, 16 bpp.
    • BGR

      public static final PixelFormat BGR
      BGR 8-8-8, 24 bpp.
    • GRAY

      public static final PixelFormat GRAY
      Grayscale, 8 bpp.
    • Y16

      public static final PixelFormat Y16
      Grayscale, 16 bpp.
    • UYVY

      public static final PixelFormat UYVY
      YUV 4:2:2, 16 bpp.
    • BGRA

      public static final PixelFormat BGRA
      BGRA 8-8-8-8. 32 bpp.
  • Method Details

    • values

      public static PixelFormat[] 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 PixelFormat 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
    • getValue

      public int getValue()
      Gets the integer value of the pixel format.
      Returns:
      Integer value
    • getFromInt

      public static PixelFormat getFromInt(int pixelFormat)
      Gets a PixelFormat enum value from its integer value.
      Parameters:
      pixelFormat - integer value
      Returns:
      Enum value