mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:57:35 +00:00
LibGfx+icc: Print if profile id is valid
This commit is contained in:
parent
fafacbb87b
commit
68f678f566
3 changed files with 34 additions and 3 deletions
|
@ -40,9 +40,14 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
outln("pcs illuminant: {}", profile->pcs_illuminant());
|
||||
|
||||
out("id: ");
|
||||
if (auto id = profile->id(); id.has_value())
|
||||
outln("{}", *id);
|
||||
else
|
||||
if (auto id = profile->id(); id.has_value()) {
|
||||
out("{}", *id);
|
||||
auto computed = Gfx::ICC::Profile::compute_id(icc_file->bytes());
|
||||
if (*id == computed)
|
||||
outln(" (valid)");
|
||||
else
|
||||
outln(" (invalid! valid would be {})", computed);
|
||||
} else
|
||||
outln("(not set)");
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue