Allow to specify DefaultGray/DefaultRGB/DefaultCMYK color spaces
This MR introduces functionality to pdftoppm/pdftops that allows to set DefaultGray/DefaultRGB/DefaultCMYK color spaces to ICC-based color spaces. Thus one can adopt a fully color-managed workflow when using these tools.
This is quite similar to what ghostscript does, with the difference that ghostscript by default sets ICC profiles for all three color spaces.
Testing has been mostly done using stunt profiles from here (CX CMYK ProofTest PCS=RGB.icc and CX RGB ProofTest PCS=RGB.icc).
@thomas I would appreciate if you could have a look at it, whether there is not another pdf corner case I could have potentially overlooked (something like softmasks have always to be DeviceGray).
@aacid In principle this should not change any output in your behemoth test suite, but it would be great if you could run the suite nonetheless. The code touches quite a few central pieces of the color management architecture of poppler, and running the suite would ensure that there has not been any oversight on my end.
The current version of the MR is based on !568, not that much that it depends on the functionality introduced there, but more out of convenience, since it touches adjacent lines of code and I want to avoid merge conflicts.
For the future: I would really like to see these features to be available in Okular, thus necessitating the interface to be added to poppler-qt5 and poppler-qt6. However, regarding the implementation in Okular and a potential design of a user interface I am still quite undecided and would very much welcome some input.
Another nicety to add in a future endeavor would be soft proofing, but there I also do not have any clue yet what is the best way to approach this problem.
Anyway, thx for reviewing