darktable icon indicating copy to clipboard operation
darktable copied to clipboard

Windows printing

Open Cjhemmer opened this issue 1 month ago • 2 comments

I'm developing an extension of the Linux print module in DT to allow for printing on Windows. I already have a Windows version of the commands needed to compose the printed page, like in Linux and to collect installed printer information. My final hurdle is Windows color management. Windows printing basically sends a bitmap (BitBlt) to the printer and can either be given an .icc profile to use as a specific file, reference an embedded .icc profile header in the BitBlt provided the .icc is installed in Windows, or told to default to sRGB. That means I need to know the source color profiles from Darktable, which I believe are not exposed as .icc profiles. Is that correct? If not, where are they stored in the file structure (LittleCMS?)?

If my assumptions are correct, I think my best approach is to, in the absence of specific paper profiles from the manufacturer (which I handle separately), by default windows printing and the composition of the print file out of DT should assume sRGB (the profile selection in the bottom part of the DT print module, not the paper profile above)?

Looking for guidance from Pascal, author of the CUPS based printing, or others who understand the pipeline better. Would love to get a draft of this into v5.5 in the new year.

Cjhemmer avatar Dec 03 '25 22:12 Cjhemmer

@Cjhemmer : First thanks a lot for working on this.

That means I need to know the source color profiles from Darktable, which I believe are not exposed as .icc profiles. Is that correct?

What do you call the source color profiles?

For printing you have two profiles:

  • One for rendering the image (bottom of the print settings dialog) defaulting to "image settings".
  • One corresponding to the printer paper (top of print settings dialog).

For the later you indeed need an ICC corresponding to the printer & driver. Those ICC can usually downloaded from the paper manufacturer Web site.

If my assumptions are correct, I think my best approach is to, in the absence of specific paper profiles from the manufacturer (which I handle separately), by default windows printing and the composition of the print file out of DT should assume sRGB (the profile selection in the bottom part of the DT print module, not the paper profile above)?

Yes, this is safe. But you must not default to, you need to let user select the export profile because some high end printer do have a gamut close or slightly above AdobeRGB.

TurboGit avatar Dec 04 '25 18:12 TurboGit

For clarity I'm specifically referring to the image rendering at the bottom of the print setting dialog that defaults to "image settings" Because that can or would generate a bitmap rendered in whatever is set there and without a means of telling Windows what icc color space it is (rec2020, Adobe RGB, sRGB, Prophoto, etc.), Windows will assume if not provided an icc when passing the file it is sRGB and colors will print incorrectly (Windows and the printer have no way of knowing). If DT stores the icc profiles for all the default working color spaces somewhare, I can pass that to Windows. Otherwise for Windows only, I'll have this default to sRGB and be disabled unless in the upper part of the dialog the settings is to let dt handle the color management (no printer color correction).

Cjhemmer avatar Dec 04 '25 21:12 Cjhemmer