API referenceRendering & Viewer

rasInitColorManagement

Enable viewer-side color management on the page cache.

C
BOOL32 __stdcall rasInitColorManagement(IPGC CachePtr, PPDFColorProfiles Profiles, TPDFInitCMFlags Flags);
Delphi
function rasInitColorManagement(CachePtr: IPGC; Profiles: PPDFColorProfiles; Flags: TPDFInitCMFlags): LongBool; stdcall;

Purpose. Enable viewer-side color management on the page cache.

Description. Partially real: the on/off state and flags are genuinely retained as real, queryable cache state, but the actual ICC profile data pointed to by Profiles is not stored at all — per the inline comment ("GAP-7: ... Retains the flags (and marks the cache colour-managed) so 'InitColorManagement active' is a real, queryable state that the tile renderer can honour. The profile blob is caller-owned; we keep the flags only."). Whether the tile renderer's color-managed path does anything beyond checking the boolean (e.g. actually applying an ICC transform) was not traced further in this chapter.

Parameters.

ParameterDescription
CachePtrTarget page cache.
ProfilesAccepted but not retained — only the fact that *some* profiles were supplied enables the flag; the actual profile bytes are not stored.
FlagsGenuinely stored (CMFlags).

Return value. True if CachePtr resolves; False otherwise (via the shared NotImplLogB path on failure).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Rendering & Viewer
Category

Rasterizer/Rendering

Exported names

rasInitColorManagement

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.