1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 12:44:58 +00:00
Commit graph

6 commits

Author SHA1 Message Date
Nico Weber
0160f737e2 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
2024-02-21 13:37:08 +01:00
Nico Weber
1e5ececf75 ICC: Add comment with a link to WellKnownProfiles.cpp 2023-04-29 06:49:36 +02:00
Nico Weber
5df35d030f LibGfx/ICC: Extract sRGB_curve() function
This returns just the tone reproduction curve of the sRGB profile.
2023-04-11 18:23:07 +02:00
Nico Weber
14581e98ad LibGfx: Remove stray space character in a comment 2023-03-16 09:20:48 -04:00
Nico Weber
efabfd4c66 LibGfx: Fill in remaining values in built-in sRGB profile
The values aren't 100% self-consistent, but it probably doesn't make
a difference for u8 color data. Good enough for now. See all the links
on #17714 for some more background.
2023-03-05 18:21:43 +00:00
Nico Weber
0ba532e14e LibGfx: Add a function to create an in-memory sRGB profile
This might be useful for converting data from arbitrary profiles to
sRGB.

For now, this only encodes the transfer function and puts in zero values
for chromaticities, whitepoint, and chromatic adaptation matrix.
This makes the profile unusable for now. But I've spent a very long time
reading things and need to check in some code, and it's some progress.

The encoded transfer function exactly matches the one in GIMP's built-in
sRGB ICC profile (but not the Compact-ICC-Profiles v4 one or the
RawTherapee v4 one -- I'll add a comment about why later.)
2023-03-04 21:38:47 +00:00