mirror of
https://github.com/RGBCube/serenity
synced 2026-01-14 14:21:00 +00:00
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.) |
||
|---|---|---|
| .. | ||
| Azure | ||
| CMake | ||
| gn | ||
| HeaderCheck | ||
| Lagom | ||
| Screenshots | ||
| ShellCompletions/zsh | ||
| Websites | ||
| analyze-qemu-coverage.sh | ||
| bochsrc | ||
| build-image-extlinux.sh | ||
| build-image-grub.sh | ||
| build-image-limine.sh | ||
| build-image-qemu.sh | ||
| build-manpages-website.sh | ||
| build-native-partition.sh | ||
| build-root-filesystem.sh | ||
| check-ak-test-files.sh | ||
| check-debug-flags.sh | ||
| check-emoji.py | ||
| check-markdown.sh | ||
| check-newlines-at-eof.py | ||
| check-png-sizes.sh | ||
| check-style.py | ||
| check-symbols.sh | ||
| convert-markdown-links.lua | ||
| debug-kernel.sh | ||
| embed_as_string_view.py | ||
| export-argsparser-manpages.sh | ||
| extlinux.conf | ||
| find_compiler.sh | ||
| generate-embedded-resource-assembly.sh | ||
| generate-libwasm-spec-test.py | ||
| 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 | ||
| lint-commit.sh | ||
| lint-executable-resources.sh | ||
| lint-gml-format.sh | ||
| 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 | ||
| run.sh | ||
| serenity.sh | ||
| serenity_gdb.py | ||
| shell_include.sh | ||
| test_pdf.py | ||
| toot-commits.js | ||
| tweet-commits.js | ||