GSoC’12 Update – Week 4

Hey everyone.

Week four of the libCmpx/Krita GSoC printer color management project is now coming to a close.

So far I have reached some important milestones in development this week. The libCmpx ‘Renderer’ module (which I talked about last week) has been worked on to the point that all of its major components are functioning, and that PDF rendering is now available for sampling in the test dialog. When both a PDF file and ICC profile is selected from the dialog, the “Print” button will be enabled — Printing in this case simply means that a profile-embedded PDF spool file will be created in your tmp directory. (Remember that only a *copy* of the selected PDF will be created and processed, not the original!)

In addition to finalizing the PDF rendering module, I have improved libCmpx ‘Selector’ so that the “bond” between the module and the printer settings is further tightened. If you recall from my earlier GSoC’12 posting, I had mentioned that a “simulated” printer was actually used in the test dialog, and not the printer(s) installed on your machine. Since printer color management has just started to appear in Linux, printer drivers with color-related attributes are not yet widely available. These attributes – called ColorKeyWords – are used to separate general printing settings (page orientation, number of pages to print, etc.) and color-specific printing settings (color or grayscale, resolution, gamma level, etc.). For automatic ICC profile selection to work inside a print dialog, the color-specific settings would need to parsed and mapped with libCmpx in order to obtain a “best fit” ICC profile.

The custom printer driver file included with the libCmpx test dialog (testprinter.ppd) just so happens to contain these ColorKeyWords attributes, and is used to provide critical color-related settings in the dialog. When you select ‘Automatic’ in the ICC color profile combobox, libCmpx Selector will attempt to find the best ICC profile based on the chosen color settings. If a best fit profile isn’t found from those settings, then libCmpx Selector will obtain fallback profiles from either the printer driver or Oyranos.

Since most of the work done this week was in putting the final touches in libCmpx Renderer, the automatic profile-selection mechanism needs some more tweaks (in most cases, selecting Automatic will simply return sRGB as a best fit profile). So libCmpx Selector will again be put back into the spotlight for week five — and from there, some prospecting on possible integration points in Krita.



GSoC’11 Midterm Update

Hello everyone.

I would like to apologize for the recent lack of weekly updates. Something had come up late in June and I missed about a week and a half of work. This will not happen again.

For the past couple of weeks, I have been working on the ‘Renderer’ portion of the XCPD CM, and finding a solution to embed a profile into a PDF. As of now, the XCPD Renderer Module code is now able to check if a file has an OutputIntent, and will direct the creation of the proper spool file. The steps are as follows:

1.) Check if a PDF file has an OutputIntent.
2.) If not, we tag the PDF with a default ICC profile.
3.) If the user has specified an ICC profile from the dialog, we convert the PDF into a PDF/X-3 file, and then embed the profile to the PDF.

Step 2 needs work, and I still need to finish implementing code to do the Tiff conversion. But for now, the ‘Renderer Test’ dialog is able to take in both a profile and PDF file, test if the file has an OutputIntent, and generate an embedded profile in a new PDF.

(The latest Ghostscript (9.02) is now required.)

Once this is all finished – and the ‘Renderer’ test dialog is made useful – I will complete the profile selection code. From there, it will be necessary to combine the completed modules (Renderer and Selector) into the XCPD to complete the prototype.

I will be doubling my efforts to make up for the lost time, but I expect the Rendering code will be finished in about a week or less.