encodeJxrCmyk
fun encodeJxrCmyk(width: Int, height: Int, ink: ByteArray, options: JxrEncodeOptions = JxrEncodeOptions(), metadata: ImageMetadata = ImageMetadata(), cancellationCheck: () -> Unit? = null): ByteArray(source)
Encode CMYK ink as a JPEG XR file of pixel format 32bppCMYK (#189), through T.832's reversible transform to YUVK. ink holds four samples a pixel, cyan, magenta, yellow and black, from no ink (0) to full (255), row by row from the top, as convertCmykToSrgb takes them. Give metadata the press's ICC profile, so that a reader can convert the ink; without one, decode draws it as it draws a CMYK TIFF. options works as for encodeJxr; chroma stays full, since YUVK has no subsampled form.
Throws
if ink does not hold width times height pixels, a side is not positive, the image has more than 2^28 pixels, or options asks for JxrChroma.Half or for tiles the image does not have
fun encodeJxrCmyk(width: Int, height: Int, ink: ShortArray, options: JxrEncodeOptions = JxrEncodeOptions(), metadata: ImageMetadata = ImageMetadata(), cancellationCheck: () -> Unit? = null): ByteArray(source)
encodeJxrCmyk at 16 bits a sample, from no ink (0) to full (65535), as 64bppCMYK.