Preserving Embedded ICC Profile

I am working on a C# project that utilises CorelDRAW in its "Vector Engine".

I've struck an issue when Corel imports a jpeg with an embedded ICC colour profile.  I've tried various combinations of options for the handling profiles upon import, but cannot get Corel to preserve the profile - it is consistently switching to sRGB (the default RGB colour profile):

const CorelDRAW.clrColorPolicyAction colorPolicyAction = CorelDRAW.clrColorPolicyAction.clrConvertToEmbeddedProfile;

ivgApp.ColorManager.PolicyForImport.ActionForRGB = colorPolicyAction;
ivgApp.ColorManager.PolicyForImport.ActionForCMYK = colorPolicyAction;

var importOptions = ivgApp.CreateStructImportOptions();

importOptions.ColorConversionOptions.ColorPolicy.ActionForRGB = colorPolicyAction;
importOptions.ColorConversionOptions.ColorPolicy.ActionForCMYK = colorPolicyAction;

I am able to get Corel to manually (via the application, not programmatically) import the image "correctly" by setting my default Import settings to "Use embedded color profile".  As per the above, this seems to have no effect when importing programmatically:

Any idea what I am missing?

  • FYI and in case anyone else strikes this issue - I have not yet been able to convince Corel to programmatically import an image with an embedded colour profile, such that it preserves the profile.

    I'm guessing that everyone else who has ever imported a file has either done it manually, or was lucky enough for the imported files to specify their currently selected Corel defaults.