Closed hellonico closed 3 years ago
fun asImageAsset(image: Mat): ImageBitmap { val bytes = MatOfByte() Imgcodecs.imencode(".jpg", image, bytes) val byteArray = ByteArray((image.total() * image.channels()).toInt()) bytes.get(0, 0, byteArray) return org.jetbrains.skija.Image.makeFromEncoded(byteArray).asImageBitmap() }
skija is of version class 55( jdk 11) and for now we still want to be compatible with jdk8 (since most of our code is in clojure)