encodeTiffCmyk

fun encodeTiffCmyk(width: Int, height: Int, ink: ByteArray, options: TiffEncodeOptions = TiffEncodeOptions(), metadata: ImageMetadata = ImageMetadata(), cancellationCheck: () -> Unit? = null): ByteArray(source)

Encode CMYK ink as a TIFF of separations (photometric 5, InkSet 1, #184), lossless. 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 libtiff's RGBA interface does.

options picks the compression and the layout as for encodeTiff; its photometric must be TiffPhotometric.Auto. The predictor applies to the ink as to colour.

Throws

if ink does not hold width times height pixels, a side is not positive, or options asks for CCITT, JPEG or a photometric other than Auto


fun encodeTiffCmyk(width: Int, height: Int, ink: ShortArray, options: TiffEncodeOptions = TiffEncodeOptions(), metadata: ImageMetadata = ImageMetadata(), cancellationCheck: () -> Unit? = null): ByteArray(source)

encodeTiffCmyk at 16 bits a sample, from no ink (0) to full (65535).