mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +00:00
icc: Print each tag signature's spec name
The spec names are still a bit cryptic ("deviceMfgDescTag" for "device manufacturer description"), but less cryptic than just the fourcc. There's a private tag area, so this will only print the spec name of tags in the current spec. Private tags are in active use, e.g.: $ icc /Library/ColorSync/Profiles/WebSafeColors.icc ... Unknown tag ('dscm'): type 'mluc', offset 312, size 1490 (That's a v2 file. In v2, 'desc' has that strange textDescriptionType. In v4, 'desc' has type 'mluc' -- but in v2, it didn't yet, so Apple invented the private 'dscm' tag which has the description as an 'mluc'.)
This commit is contained in:
parent
2e315757b1
commit
2095e2529f
2 changed files with 6 additions and 2 deletions
|
@ -93,7 +93,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
outln("tags:");
|
||||
HashMap<Gfx::ICC::TagData*, Gfx::ICC::TagSignature> tag_data_to_first_signature;
|
||||
profile->for_each_tag([&tag_data_to_first_signature](auto tag_signature, auto tag_data) {
|
||||
outln("{}: {}, offset {}, size {}", tag_signature, tag_data->type(), tag_data->offset(), tag_data->size());
|
||||
if (auto name = tag_signature_spec_name(tag_signature); name.has_value())
|
||||
out("{} ({}): ", *name, tag_signature);
|
||||
else
|
||||
out("Unknown tag ({}): ", tag_signature);
|
||||
outln("type {}, offset {}, size {}", tag_data->type(), tag_data->offset(), tag_data->size());
|
||||
|
||||
// Print tag data only the first time it's seen.
|
||||
// (Different sigatures can refer to the same data.)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue