public final class ImageFormat extends Object
This class defines how image data is organized and represented, and provides interfaces for obtaining the number of image format components and bits per pixel adopted by a format.
SystemCapability.Multimedia#IMAGE| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
ImageFormat.ComponentType |
Describes the component type of encoding formats.
|
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
H264 |
Indicates the H264 encoding format.
|
static int |
H265 |
Indicates the H265 encoding format.
|
static int |
JPEG |
Indicates the JPEG encoding format.
|
static int |
NV21 |
Indicates the YUV420 format with NV21 encoding.
|
static int |
RAW10 |
Indicates the RAW10 format with 10 bits per component.
|
static int |
RAW16 |
Indicates the RAW10 format with 16 bits per component.
|
static int |
UNKNOWN |
Indicates an unknown encoding format.
|
static int |
YUV420_888 |
Indicates the generic YUV420 format with 8 bits per component (Y, U, and V).
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static int |
getBitsNumberPerPixel(int format) |
Obtains the number of bits per pixel of the specified image format.
|
static int |
getComponentNumber(int format) |
Obtains the number of components of a specified image format.
|
public static final int H264
public static final int H265
public static final int JPEG
public static final int NV21
public static final int RAW10
public static final int RAW16
public static final int UNKNOWN
public static final int YUV420_888
public static int getBitsNumberPerPixel(int format)
format - Indicates an image format.public static int getComponentNumber(int format)
format - Indicates an image format.