What is the correct way to print an image containing an embedded icc profile?
The way I am trying right now is to:
- call
DocumentProperties
to get the size of aDEVMODE
struct - call
DocumentProperties
to get a defaultDEVMODE
- set
dmICMMethod = DMICMMETHOD_SYSTEM
anddmICMIntent = DMICM_CONTRAST
- call
DocumentProperties
to merge my settings into theDEVMODE
struct - call
CreateDC
with the newly createdDEVMODE
struct - call
StartDoc
with the hDC - call
StartPage
with the hDC - call
SetICMMode
to enable ICM - load an image into a
BITMAPV5HEADER
where thebV5CSType
is set toPROFILE_EMBEDDED
and thebV5ProfileData
and thebV5ProfileSize
is set.bV5Intent
is set toLCS_GM_IMAGES
- draw the image using
StretchDIBits
- clean up
Questions:
- Is this the right way to do it?
- Does the call to
SetICMMode
override value set in theDEVMODE.dmICMMethod
? - Does the
BITMAPV5HEADER.bV5Intent
override theDEVMODE.dmICMIntent
? - Should this give the same output as Photoshop when color handling in Photoshop is set to "Printer manages colors"?