mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibGfx/ICC+icc: Be lenient about invalid profile creation datetimes
Before, we used to reject profiles where the creation datetime was invalid per spec. But invalid dates happen in practice (most commonly, all fields set to 0). They don't affect profile conversion at all, so be lenient about this, in exchange for slightly more wordy code in the places that want to show the creation datetime. Fixes a crash rendering page 2 of https://fredrikbk.com/publications/copy-and-patch.pdf
This commit is contained in:
parent
3b7c252175
commit
0160f737e2
5 changed files with 114 additions and 53 deletions
|
@ -18,7 +18,7 @@ static ProfileHeader rgb_header()
|
|||
header.device_class = DeviceClass::DisplayDevice;
|
||||
header.data_color_space = ColorSpace::RGB;
|
||||
header.connection_space = ColorSpace::PCSXYZ;
|
||||
header.creation_timestamp = time(NULL);
|
||||
header.creation_timestamp = MUST(DateTime::from_time_t(0));
|
||||
header.rendering_intent = RenderingIntent::Perceptual;
|
||||
header.pcs_illuminant = XYZ { 0.9642, 1.0, 0.8249 };
|
||||
return header;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue