Skip to content

Kairo Image

Convenience wrapper around Java’s built-in ImageIO for format conversion.

Install kairo-image.

build.gradle.kts
dependencies {
implementation("com.highbeam.kairo:kairo-image")
}

Converts an image from one format to another using Java’s ImageIO. Takes a ByteArray (the source image) and a format name, returns the converted ByteArray.

val jpeg: ByteArray = convertImage(png, "jpeg")

Supported format names depend on your JVM’s ImageIO providers. Common formats include "jpeg", "png", "gif", and "bmp".