ladybird/Meta
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
..
Azure CI: Lower the timeout for Lagom tests to 1 hour 2023-12-24 14:09:59 +01:00
CMake LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB 2024-02-01 13:42:04 -07:00
gn Meta: Port recent changes to the GN build 2024-01-29 07:21:59 +01:00
HeaderCheck
Lagom LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB 2024-02-01 13:42:04 -07:00
Screenshots
ShellCompletions/zsh Everywhere: Add RISC-V 64 target to the build system 2023-08-18 08:37:43 -06:00
Websites Meta: Add anchors to headings of man pages 2023-10-30 10:26:21 +00:00
analyze-qemu-coverage.sh
bochsrc Meta: Use BXSHARE instead of a hardcoded Bochs directory 2024-01-22 20:18:38 -07:00
build-image-extlinux.sh
build-image-grub.sh
build-image-limine.sh
build-image-qemu.sh
build-manpages-website.sh Meta: Add anchors to headings of man pages 2023-10-30 10:26:21 +00:00
build-native-partition.sh
build-root-filesystem.sh Meta: Create symbolic link from /init to /bin/SystemServer 2023-11-27 09:29:05 -07:00
check-ak-test-files.sh
check-debug-flags.sh Meta: Fix typos in shell script comments 2023-10-26 15:45:31 -06:00
check-emoji.py
check-markdown.sh
check-newlines-at-eof.py
check-png-sizes.sh
check-style.py JSSpecCompiler: Add our first test :^) 2023-12-07 10:13:21 -07:00
check-symbols.sh
convert-markdown-links.lua
debug-kernel.sh
embed_as_string_view.py Meta: Make embed_as_string_view.py usable by CMake builds :^) 2023-08-24 07:42:12 +01:00
export-argsparser-manpages.sh
extlinux.conf
find_compiler.sh Meta: Do not spam "<compiler-name>: command not found" 2023-09-09 13:38:06 -06:00
generate-embedded-resource-assembly.sh
generate-libwasm-spec-test.py LibWasm: Implement a few SIMD instructions 2023-08-21 13:39:32 +03:30
generate-libwasm-spec-test.sh
grub-ebr.cfg
grub-gpt.cfg
grub-mbr.cfg
install-ports-tree.sh
label-pull-requests.js
limine.cfg
lint-ci.sh
lint-clang-format.sh Meta: Lint .mm files with lint-clang-format.sh 2023-09-19 11:37:48 -06:00
lint-commit.sh
lint-executable-resources.sh
lint-gml-format.sh Meta: Fix typos in shell script comments 2023-10-26 15:45:31 -06:00
lint-gn.sh
lint-keymaps.py
lint-ports.py
lint-prettier.sh
lint-python.sh
lint-shell-scripts.sh
new-project.sh
refresh-serenity-qtcreator.sh
run.py Meta/run.py: Fix grammar in method names 2024-01-16 09:55:42 -05:00
run.sh Meta: Replace run.sh by run.py 2023-12-15 00:11:50 +01:00
serenity.sh Everywhere: Remove references to UserspaceEmulator 2024-01-29 20:20:55 +00:00
serenity_gdb.py Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
shell_include.sh Meta: Fix typos in shell script comments 2023-10-26 15:45:31 -06:00
test_pdf.py Meta: Let test_pdf.py be less dramatic about issue counts 2024-01-10 09:36:33 +01:00
toot-commits.js
tweet-commits.js