set CMYKProfile
Deprecated
Use setDocumentColorProfile with Default/CMYK instead.
Replace with
import ly.img.engine.ProfileSlot
import ly.img.engine.ProfileRole
import ly.img.engine.ProfileColorSpace
setDocumentColorProfile(ProfileSlot(ProfileRole.DEFAULT, ProfileColorSpace.CMYK), uri)Loads the ICC profile at uri and makes it the CMYK profile of the document. Assigns to the slot with role Default and color space CMYK.
The profile is document state: it is saved with the scene and bundled into an archive. It converts CMYK colors, the CMYK approximations of spot colors, and CMYK images without an embedded profile, while scene/colorConversionMode is Managed. An image with its own profile keeps using that profile.
The assignment is atomic. The previous profile stays in effect while the new one loads, and a failure leaves it unchanged. A later assignment, removeCMYKProfile or a scene load replaces a request that is still loading. Undo and redo do not change the profile.
Throws with COLOR.PROFILE_MISSING when the URI cannot be loaded, COLOR.PROFILE_INVALID or COLOR.PROFILE_UNSUPPORTED_SPACE when the bytes are not a usable profile, COLOR.PROFILE_SPACE_MISMATCH when the profile is not CMYK, and COLOR.PROFILE_ASSIGNMENT_SUPERSEDED when a later change replaced the request.
Cancelling the coroutine stops the download, and the previous profile stays.
Parameters
the URI of a CMYK ICC profile.