Enum FrameFormat

java.lang.Object
java.lang.Enum<FrameFormat>
com.codename1.camera.FrameFormat
All Implemented Interfaces:
Comparable<FrameFormat>

public enum FrameFormat extends Enum<FrameFormat>

Pixel format requested for CameraFrame data delivered to a FrameListener.

JPEG is the default and is useful when an application needs a portable encoded image. Built-in vision analyzers also accept raw NV21 and RGBA8888 frames directly; select a raw format for live analysis to avoid a JPEG encode/decode round-trip.

  • Enum Constant Details

    • JPEG

      public static final FrameFormat JPEG
      JPEG-encoded bytes available via CameraFrame#getJpegBytes(). Always available regardless of the requested format.
    • NV21

      public static final FrameFormat NV21
      YUV 4:2:0 NV21 layout available via CameraFrame#getRawBytes(). Useful for low-level pixel work on Android-style pipelines.
    • RGBA8888

      public static final FrameFormat RGBA8888
      32-bit RGBA available via CameraFrame#getRawBytes(). Width * height * 4 bytes.
  • Method Details

    • values

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

      public static FrameFormat valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null