summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/ICCProfile.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2022-12-31 13:50:52 -0500
committerAndreas Kling <kling@serenityos.org>2022-12-31 23:17:48 +0100
commit0b46e572b55ddb5075212342cff192abf501537e (patch)
treeab7ba06ac862519890f445b96b5be763d3f2eaf3 /Userland/Libraries/LibGfx/ICCProfile.cpp
parent88d5fd4b733b2f1ff83659d130b2fce40f53cfaa (diff)
downloadserenity-0b46e572b55ddb5075212342cff192abf501537e.zip
LibGfx+icc: Print profile flags
These flags are always 0 in practice in all profiles I've seen so far, but hey, probably nice to dump them anyways.
Diffstat (limited to 'Userland/Libraries/LibGfx/ICCProfile.cpp')
-rw-r--r--Userland/Libraries/LibGfx/ICCProfile.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/ICCProfile.cpp b/Userland/Libraries/LibGfx/ICCProfile.cpp
index b1527781ee..76963281cb 100644
--- a/Userland/Libraries/LibGfx/ICCProfile.cpp
+++ b/Userland/Libraries/LibGfx/ICCProfile.cpp
@@ -284,6 +284,12 @@ StringView rendering_intent_name(RenderingIntent rendering_intent)
VERIFY_NOT_REACHED();
}
+Flags::Flags() = default;
+Flags::Flags(u32 bits)
+ : m_bits(bits)
+{
+}
+
ErrorOr<NonnullRefPtr<Profile>> Profile::try_load_from_externally_owned_memory(ReadonlyBytes bytes)
{
auto profile = adopt_ref(*new Profile());
@@ -298,6 +304,7 @@ ErrorOr<NonnullRefPtr<Profile>> Profile::try_load_from_externally_owned_memory(R
profile->m_device_class = TRY(parse_device_class(header));
profile->m_data_color_space = TRY(parse_data_color_space(header));
profile->m_creation_timestamp = TRY(parse_creation_date_time(header));
+ profile->m_flags = Flags { header.profile_flags };
profile->m_rendering_intent = TRY(parse_rendering_intent(header));
return profile;