mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:37:34 +00:00
LibGfx: Move ICC ViewingConditionsHeader to BinaryFormat.h
This commit is contained in:
parent
841e359341
commit
933002ae5a
2 changed files with 8 additions and 8 deletions
|
@ -149,4 +149,12 @@ struct MultiLocalizedUnicodeRawRecord {
|
||||||
};
|
};
|
||||||
static_assert(AssertSize<MultiLocalizedUnicodeRawRecord, 12>());
|
static_assert(AssertSize<MultiLocalizedUnicodeRawRecord, 12>());
|
||||||
|
|
||||||
|
// Table 84 — viewingConditionsType encoding
|
||||||
|
struct ViewingConditionsHeader {
|
||||||
|
XYZNumber unnormalized_ciexyz_values_for_illuminant; // "(in which Y is in cd/m2)"
|
||||||
|
XYZNumber unnormalized_ciexyz_values_for_surround; // "(in which Y is in cd/m2)"
|
||||||
|
BigEndian<MeasurementTagData::StandardIlluminant> illuminant_type;
|
||||||
|
};
|
||||||
|
static_assert(AssertSize<ViewingConditionsHeader, 28>());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1175,14 +1175,6 @@ ErrorOr<NonnullRefPtr<ViewingConditionsTagData>> ViewingConditionsTagData::from_
|
||||||
VERIFY(tag_type(bytes) == Type);
|
VERIFY(tag_type(bytes) == Type);
|
||||||
TRY(check_reserved(bytes));
|
TRY(check_reserved(bytes));
|
||||||
|
|
||||||
// Table 84 — viewingConditionsType encoding
|
|
||||||
struct ViewingConditionsHeader {
|
|
||||||
XYZNumber unnormalized_ciexyz_values_for_illuminant; // "(in which Y is in cd/m2)"
|
|
||||||
XYZNumber unnormalized_ciexyz_values_for_surround; // "(in which Y is in cd/m2)"
|
|
||||||
BigEndian<MeasurementTagData::StandardIlluminant> illuminant_type;
|
|
||||||
};
|
|
||||||
static_assert(AssertSize<ViewingConditionsHeader, 28>());
|
|
||||||
|
|
||||||
if (bytes.size() < 2 * sizeof(u32) + sizeof(ViewingConditionsHeader))
|
if (bytes.size() < 2 * sizeof(u32) + sizeof(ViewingConditionsHeader))
|
||||||
return Error::from_string_literal("ICC::Profile: viewingConditionsType has not enough data");
|
return Error::from_string_literal("ICC::Profile: viewingConditionsType has not enough data");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue