views:

12

answers:

0

What is the correct way to print an image containing an embedded icc profile?

The way I am trying right now is to:

  1. call DocumentProperties to get the size of a DEVMODE struct
  2. call DocumentProperties to get a default DEVMODE
  3. set dmICMMethod = DMICMMETHOD_SYSTEM and dmICMIntent = DMICM_CONTRAST
  4. call DocumentProperties to merge my settings into the DEVMODE struct
  5. call CreateDC with the newly created DEVMODE struct
  6. call StartDoc with the hDC
  7. call StartPage with the hDC
  8. call SetICMMode to enable ICM
  9. load an image into a BITMAPV5HEADER where the bV5CSType is set to PROFILE_EMBEDDED and the bV5ProfileData and the bV5ProfileSize is set. bV5Intent is set to LCS_GM_IMAGES
  10. draw the image using StretchDIBits
  11. clean up

Questions:

  1. Is this the right way to do it?
  2. Does the call to SetICMMode override value set in the DEVMODE.dmICMMethod?
  3. Does the BITMAPV5HEADER.bV5Intent override the DEVMODE.dmICMIntent?
  4. Should this give the same output as Photoshop when color handling in Photoshop is set to "Printer manages colors"?