The last of the GSoC code was committed yesterday.
The following is a modified scheme of Kai-Uwe’s color-managed printer workflow, in which I have added in the necessary calls from XCPD CM to make the steps work:
Two calls from the printer dialog (“xcpdCM_setProfileFromPPD” and “xcpdCM_setSpoolPdf()”) are used to handle both profile-selection and PDF rendering, respectively. The functions listed below each step represent internal calls to each of the two modules, for which the dialog programmer will need no interest in.
The work that I have done over the summer has managed to put these pieces together by abstracting the workflow, and setting up the necessary test/demo UIs to help diagnose the code (“XCPD Test Suite”).
Profile selection in the XCPD CM code will properly flow through the above sequence, but there remains some polishing internally that need to be made. Right now I am working with Kai-Uwe in helping pin-point the correct result using the Oyranos CUPS module. We have with us now a PPD with the necessary ColorKeyWords listing, and a profile with a meta tag containing the print options. So far, the results using these resources have been promising and with a few more tweaks, we will have a fully-working profile selector.
However, the colorspace tagging in the PDF turned out to be much more difficult than I anticipated. Mainly this had to do with trying to find a way to parse the PDF by hand in order to remove the ‘DeviceRGB’ /ColorSpace dict item, to which “/DefaultRGB” would be its replacement. The “DefaultRGB” value has to point to an embedded sRGB profile from within the PDF, which requires the profile object ID from within the PDF (“/DefaultRGB <<12 0 R>>”, where 12 is the profile object located elsewhere in the PDF). Parsing for the sRGB object ID and then putting it in with DefaultRGB required a lot of code, which unfortunately did not produce the correct output. Recently I added some Postscript code for Ghostscript as an alternate solution, but I had to shift focus to work on the profile selection code.
So in essence, the “DeviceXXX* to Default Colour Spaces” step is the only piece that’s not well-implemented in the XCPD CM code right now.
With all this said, however, I will continue to work on polishing up the code even after GSoC. Time will need to be managed for this to happen, but I can guarantee about 3 more weeks to fine-tune, fix, and answer any concerns that may come up with this model. Since this is an important item in the printer and color-management circles, I will do my best to make sure the code will function correctly in the actual CPD, as well as write a more generic model that will work for any print dialog.
Thank you everyone for your assistance during the summer!