serenity/Tests
Nico Weber 9c762b9650 LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB
CMYK data describes which inks a printer should use to print a color.
If a screen should display a color that's supposed to look similar
to what the printer produces, it results in a color very different
to what Color::from_cmyk() produces. (It's also printer-dependent.)

There are many ICC profiles describing printing processes. It doesn't
matter too much which one we use -- most of them look somewhat
similar, and they all look dramatically better than Color::from_cmyk().

This patch adds a function to download a zip file that Adobe offers
on their web site. They even have a page for redistribution:
https://www.adobe.com/support/downloads/iccprofiles/icc_eula_win_dist.html

(That one leads to a broken download though, so this downloads the
end-user version.)

In case we have to move off this download at some point, there are also
a whole bunch of profiles at https://www.color.org/registry/index.xalter
that "may be used, embedded, exchanged, and shared without restriction".

The adobe zip contains a whole bunch of other useful and fun profiles,
so I went with it.

For now, this only unzips the USWebCoatedSWOP.icc file though, and
installs it in ${CMAKE_BINARY_DIR}/Root/res/icc/Adobe/CMYK/. In
Serenity builds, this will make it to /res/icc/Adobe/CMYK in the
disk image. And in lagom build, after #23016 this is the
lagom res staging directory that tools can install via
Core::ResourceImplementation. `pdf` and `MacPDF` already do that,
`TestPDF` now does it too.

The final piece is that LibPDF then loads the profile from there
and uses it for DeviceCMYK color conversions.

(Doing file access from the bowels of a library is a bit weird,
especially in a system that has sandboxing built in. But LibGfx does
that in FontDatabase too already, and LibPDF uses that, so it's not a
new problem.)
2024-02-01 13:42:04 -07:00
..
AK AK+Everywhere: Remove JsonValue APIs with implicit default values 2024-01-21 15:47:53 -07:00
JSSpecCompiler JSSpecCompiler: Always treat trailing MemberAccess as punctuation 2024-01-21 14:57:10 -07:00
Kernel Tests/Kernel: Properly synchronize threads in TestTCPSocket 2024-01-30 18:46:37 -07:00
LibAudio LibAudio: Test reading and writing of wav files 2024-01-08 07:20:11 -07:00
LibC LibFileSystem+Everywhere: Return ByteString from read_link() 2024-01-16 08:42:34 +00:00
LibCompress Tests/LibCompress: Add a reproducer of oss-fuzz issue 58046 2024-01-13 15:17:08 -07:00
LibCore AK+LibCore: Add BufferedSocket::can_read_up_to_delimiter() 2024-01-21 21:13:58 +01:00
LibCpp
LibCrypto LibCrypto: Add support for the POSIX cksum algorithm 2024-01-18 18:01:26 +03:30
LibDiff
LibEDID
LibELF LibFileSystem+Everywhere: Return ByteString from read_link() 2024-01-16 08:42:34 +00:00
LibGfx LibGfx+Tests: Improve calculation of restart interval 2024-01-30 14:50:43 +01:00
LibGL
LibGLSL
LibIMAP
LibJS
LibLocale
LibMarkdown
LibPDF LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB 2024-02-01 13:42:04 -07:00
LibRegex LibRegex: Correct And/Or and inversion interplay semantics 2024-01-11 11:36:09 +01:00
LibSQL LibSQL: Add a helper to convert a SQL::Value to a UnixDateTime 2024-01-10 23:26:40 +01:00
LibTest LibTest: Add more numeric generators 2024-01-12 16:42:51 -07:00
LibTextCodec
LibThreading
LibTimeZone
LibTLS
LibTTF
LibUnicode
LibVideo
LibWasm
LibWeb LibWeb: Apply scroll offset to PushStackingContext command 2024-02-01 13:38:45 +01:00
LibWebView LibWebView: Fix sanitizing about scheme URLs 2024-01-13 13:41:09 -05:00
LibXML
Spreadsheet
UserspaceEmulator Everywhere: Remove references to UserspaceEmulator 2024-01-29 20:20:55 +00:00
Utilities
CMakeLists.txt