//clika-runtime/io.clika.runtime/Io/loadImage
loadImage
[common]
fun loadImage(path: String, channels: Int = 0): Tensor
Decode an image file to a host [H, W, C] UInt8 tensor. channels of 0 keeps the file's own channel count; 1, 3 or 4 forces gray, RGB or RGBA. An EXIF orientation tag is applied, so the tensor is the image as displayed. Move it to a device with Tensor.to.
[common]
fun loadImage(bytes: ByteArray, channels: Int = 0): Tensor
Decode an encoded image payload in memory; the same contract as the file form.