| Previous | Next |
| ERROR_INVALID_COLORSPACE | ERROR_DELETING_ICM_XFORM |
ERROR_ICM_NOT_ENABLED
Image Color Management is not enabled.
ERROR_ICM_NOT_ENABLED is Win32 error 2018 (0x7E2). In the GDI path, color management is a property of the device context rather than a global promise that every bitmap or printer job is color corrected. A color-managed call can therefore fail even when valid profiles are installed because the actual DC used for output is still in ICM_OFF mode.
Why the expected color-managed path is inactive
- the application never called
SetICMModewithICM_ONfor the final display or printer DC - a new or recreated DC replaced the one on which color management had previously been enabled
- printing code assumes a driver or device will perform color management while the selected mode delegates it elsewhere
- a rendering helper receives a memory DC whose state differs from the destination DC used during testing
- initialization failed earlier, but the program continued into a transform-dependent operation without checking the mode
State worth recording
Log the API returning 2018, DC type and creation path, SetICMMode(ICM_QUERY) result, selected bitmap or printer format, device name, driver and profile association, rendering thread, and whether the DC was recreated after a display, printer, or settings change. Do not infer ICM state from the presence of an ICC file alone.
Diagnostic sequence
Query the exact DC immediately before the failing operation. Trace where it was created, selected into another object, reset, or replaced. For printing, inspect the effective DEVMODE color-management choice and determine whether the application, driver, or device is responsible for conversion.
Enable ICM on a controlled test DC and repeat with a known-good source and destination profile. If that succeeds, restore the real pipeline one stage at a time. If it does not, investigate profile, transform, and format errors separately instead of treating every color failure as disabled ICM.
Recovery and design guidance
Call SetICMMode on the DC that will actually perform the operation, then rebuild or reselect dependent color state as required by the API. Reapply the mode after DC recreation rather than caching a process-wide Boolean.
Applications should make color-management ownership explicit, query state at boundaries, and test display, memory, preview, and printer DCs independently. Administrators should verify driver settings and device profiles when the application correctly enables ICM but output still bypasses expected correction.
Difference from an invalid profile
ERROR_INVALID_PROFILE means a located profile cannot be interpreted. Error 2018 occurs before that distinction matters: the selected device-context path is not operating with Image Color Management enabled.
Example
A print preview enables ICM on its screen DC, then the print command creates a fresh printer DC and reuses the preview flag. The print conversion returns 2018. Querying and enabling ICM on the printer DC fixes the state without changing the profiles.
References
- Microsoft: System Error Codes (1700–3999)
- Microsoft: Win32 Error Codes in MS-ERREF
- Microsoft: Error codes specific to WCS
- Microsoft: SetICMMode
- Microsoft: Enabling color management for printing
Looking for a different code? Search another status or error code.
