set CMYKProfile From Data
Deprecated
Use setDocumentColorProfileFromData with Default/CMYK instead.
Replace with
import ly.img.engine.ProfileSlot
import ly.img.engine.ProfileRole
import ly.img.engine.ProfileColorSpace
setDocumentColorProfileFromData(ProfileSlot(ProfileRole.DEFAULT, ProfileColorSpace.CMYK), data)Makes the ICC profile in data the CMYK profile of the document. Assigns to the slot with role Default and color space CMYK.
Works like setCMYKProfile, but the change is in effect when the call returns. The engine keeps one buffer per distinct profile for its lifetime. SceneApi.saveToString stores this profile as a buffer:// URI that only this engine can read. Save to an archive to keep the profile bytes with the scene.
Throws with COLOR.PROFILE_INVALID or COLOR.PROFILE_UNSUPPORTED_SPACE when the bytes are not a usable profile, and COLOR.PROFILE_DATA_SPACE_MISMATCH when the profile is not CMYK. The previous profile then stays in effect.
Parameters
the bytes of a CMYK ICC profile. Must be a direct buffer.