13 AndroidBitmapFormat
format;
14} gColorTypeTable[] = {
26 for (
const auto& entry : gColorTypeTable) {
31 return ANDROID_BITMAP_FORMAT_NONE;
35 for (
const auto& entry : gColorTypeTable) {
36 if (entry.format ==
format) {
37 return entry.colorType;
48 {0.486143, 0.323835, 0.154234},
49 {0.226676, 0.710327, 0.0629966},
50 {0.000800549, 0.0432385, 0.78275},
58} gColorSpaceTable[] = {
73 return fabs(
a -
b) < .002f;
87 for (
int i = 0;
i < 3;
i++)
88 for (
int j = 0; j < 3; j++) {
96 if (!cs)
return ADATASPACE_SRGB;
101 for (
const auto& entry : gColorSpaceTable) {
103 return entry.dataSpace;
107 return ADATASPACE_UNKNOWN;
111 for (
const auto& entry : gColorSpaceTable) {
112 if (entry.dataSpace == dataSpace) {
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
@ kUnknown_SkColorType
uninitialized
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static bool nearly_equal(float a, float b)
static constexpr skcms_TransferFunction k2Dot6
static constexpr skcms_Matrix3x3 kDCIP3
bool isNumericalTransferFn(skcms_TransferFunction *fn) const
bool toXYZD50(skcms_Matrix3x3 *toXYZD50) const
static sk_sp< SkColorSpace > MakeRGB(const skcms_TransferFunction &transferFn, const skcms_Matrix3x3 &toXYZ)
uint32_t uint32_t * format
AndroidBitmapFormat toAndroidBitmapFormat(SkColorType colorType)
ADataSpace toDataSpace(SkColorSpace *cs)
SkColorType toColorType(AndroidBitmapFormat format)
sk_sp< SkColorSpace > toColorSpace(ADataSpace dataSpace)
static constexpr skcms_Matrix3x3 kSRGB
static constexpr skcms_Matrix3x3 kAdobeRGB
static constexpr skcms_Matrix3x3 kRec2020
static constexpr skcms_Matrix3x3 kDisplayP3
static constexpr skcms_TransferFunction kRec2020
static constexpr skcms_TransferFunction k2Dot2
static constexpr skcms_TransferFunction kSRGB
static constexpr skcms_TransferFunction kLinear