JPEG part 6 defines CMYK support. This commit adds such support to the JPEG plugin. A *very* interesting discovery is the fact that Photoshop inverts the meaning of the CMYK color channels when saving into JPEG: 0 means "full ink", and 255 means "no ink". Most other image viewers/editors follow the same interpretation, I imagine for compatibility. But others, like Adobe Reader, don't (???) -- a PDF expects a DCT encoding with 0 meaning "no ink". I am adding a SubType to the image I/O handler to let the user choose what they want, defaulting to Photoshop behavior. Also, turns out that Qt was already loading CMYK files and converting them to RGB. I don't think we should do automatic, lossy conversions (we were not taking into account an eventual colorspace...), so I'm changing that loading to yield a CMYK QImage. Finally: save the colorspace, even if it's a CMYK image. QColorSpace doesn't support anything but RGB matrix-based colorspaces. Yet, it can load an arbitrary ICC profile, and will store it even if it's unable to use it. We can use this fact to preserve the colorspace embedded in CMYK images, or let users set an arbitrary ICC profile on them through Qt APIs, and then saving the result in JPEG. [ChangeLog][QtGui][JPEG] Added support for loading and saving of JPEG files in 8-bit CMYK format. When loading a CMYK JPEG file, Qt used to convert it automatically to a RGB image; now instead it's kept as-is. This work has been kindly sponsored by the QGIS project (https://qgis.org/). Change-Id: Ibdbfa16aa35814f5dba28c2df89577175162b731 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> |
||
|---|---|---|
| .. | ||
| auto | ||
| baseline | ||
| benchmarks | ||
| global | ||
| libfuzzer | ||
| manual | ||
| shared | ||
| testserver | ||
| CMakeLists.txt | ||
| README | ||
README
This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.
Linux X11:
* The user must be logged in to an active desktop; you can't run the
autotests without a valid DISPLAY that allows X11 connections.
* The tests are run against a KDE3 or KDE4 desktop.
* Window manager uses "click to focus", and not "focus follows mouse". Many
tests move the mouse cursor around and expect this to not affect focus
and activation.
* Disable "click to activate", i.e., when a window is opened, the window
manager should automatically activate it (give it input focus) and not
wait for the user to click the window.