setDocumentColorProfileFromData

Assigns ICC bytes synchronously, with the same slots and persistence as setDocumentColorProfile. The engine copies the bytes and keeps one buffer per distinct profile for its lifetime. saveToString stores a buffer URI readable only by this engine; use an archive to retain bytes. To save a URL instead, upload the bytes that findAllTransientResources lists and call relocateResource before saving.

Parameters

slot

the role and component space to assign.

data

ICC bytes matching the slot's space. Must be a direct buffer.

Throws

on invalid bytes or a space mismatch. The previous profile stays unchanged.