Skip to main content

//clika-runtime/io.clika.modelverse/ImageInput

ImageInput

sealed interface ImageInput

A picture handed to a vision model: the bitmap's pixels, or the encoded file.

Inheritors​

Rgba8888
Encoded

Types​

NameSummary
Encoded[common]
class Encoded(val bytes: ByteArray) : ImageInput
An encoded image file (PNG or JPEG bytes), decoded by the library.
Rgba8888[common]
class Rgba8888(val pixels: ByteArray, val width: Int, val height: Int) : ImageInput
The pixels of an ARGB_8888 bitmap as Bitmap.copyPixelsToBuffer writes them: four bytes per pixel in the order red, green, blue, alpha, row by row, width × height pixels. The alpha is dropped; the model reads the color.