Enum FrameFormat
- All Implemented Interfaces:
Comparable<FrameFormat>
Pixel format requested for CameraFrame data delivered to a FrameListener.
JPEG is the default and the right choice for feeding frames into the
com.codename1.ai.* modules, all of which accept JPEG byte[] directly.
Raw formats (NV21, RGBA8888) are useful when an application performs
its own pixel processing and wants to avoid the JPEG encode/decode round-trip.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic FrameFormatReturns the enum constant of this type with the specified name.static FrameFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
JPEG
JPEG-encoded bytes available viaCameraFrame#getJpegBytes(). Always available regardless of the requested format; this is the universal format for AI/vision module integration. -
NV21
YUV 4:2:0 NV21 layout available viaCameraFrame#getRawBytes(). Useful for low-level pixel work on Android-style pipelines. -
RGBA8888
32-bit RGBA available viaCameraFrame#getRawBytes(). Width * height * 4 bytes.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-