mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
icc: Print MultiLocalizedUnicodeTagData contents
This commit is contained in:
parent
3bc70d7aa5
commit
19ce63babf
2 changed files with 11 additions and 1 deletions
|
@ -276,6 +276,8 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector<Record> const& records() const { return m_records; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Vector<Record> m_records;
|
Vector<Record> m_records;
|
||||||
};
|
};
|
||||||
|
|
|
@ -94,7 +94,15 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
profile->for_each_tag([](auto tag_signature, auto tag_data) {
|
profile->for_each_tag([](auto tag_signature, auto tag_data) {
|
||||||
outln("{}: {}, offset {}, size {}", tag_signature, tag_data->type(), tag_data->offset(), tag_data->size());
|
outln("{}: {}, offset {}, size {}", tag_signature, tag_data->type(), tag_data->offset(), tag_data->size());
|
||||||
|
|
||||||
if (tag_data->type() == Gfx::ICC::TextTagData::Type) {
|
if (tag_data->type() == Gfx::ICC::MultiLocalizedUnicodeTagData::Type) {
|
||||||
|
auto& multi_localized_unicode = static_cast<Gfx::ICC::MultiLocalizedUnicodeTagData&>(*tag_data);
|
||||||
|
for (auto& record : multi_localized_unicode.records()) {
|
||||||
|
outln(" {:c}{:c}/{:c}{:c}: \"{}\"",
|
||||||
|
record.iso_639_1_language_code >> 8, record.iso_639_1_language_code & 0xff,
|
||||||
|
record.iso_3166_1_country_code >> 8, record.iso_3166_1_country_code & 0xff,
|
||||||
|
record.text);
|
||||||
|
}
|
||||||
|
} else if (tag_data->type() == Gfx::ICC::TextTagData::Type) {
|
||||||
outln(" text: \"{}\"", static_cast<Gfx::ICC::TextTagData&>(*tag_data).text());
|
outln(" text: \"{}\"", static_cast<Gfx::ICC::TextTagData&>(*tag_data).text());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue