AndroidBitmapInfo

位图信息,请参阅 AndroidBitmap_getInfo()

摘要

公共属性

flags
uint32_t
包含位图信息的位字段。
format
int32_t
位图像素格式。
height
uint32_t
位图的高度(以像素为单位)。
stride
uint32_t
每行字节数。
width
uint32_t
位图的宽度(以像素为单位)。

公共属性

flags

android/bitmap.h 中声明
uint32_t AndroidBitmapInfo::flags

包含位图信息的位字段。

使用两位对 Alpha 进行编码。使用 ANDROID_BITMAP_FLAGS_ALPHA_MASKANDROID_BITMAP_FLAGS_ALPHA_SHIFT 来获取它们。

使用一位来编码位图是否使用 HARDWARE Config。使用 ANDROID_BITMAP_FLAGS_IS_HARDWARE 可知。

这些标志在 API level 30 中引入。

format

android/bitmap.h 中声明
int32_t AndroidBitmapInfo::format

位图像素格式。

请参阅 AndroidBitmapFormat

height

android/bitmap.h 中声明
uint32_t AndroidBitmapInfo::height

位图的高度(以像素为单位)。

stride

android/bitmap.h 中声明
uint32_t AndroidBitmapInfo::stride

每行字节数。

width

android/bitmap.h 中声明
uint32_t AndroidBitmapInfo::width

位图的宽度(以像素为单位)。