//clika-runtime/io.clika.runtime/Io/encodeImage
encodeImage
[common]
fun encodeImage(image: Tensor): ByteArray
Encode a host image tensor as a PNG payload: [H, W] or [H, W, C] channels-last, UInt8 with 1, 3 or 4 channels, or a UInt16 single channel (16-bit gray). The PNG carries no color profile, so a decoder never changes the pixel values; a class-index mask or a depth map round-trips exactly.