Michael Paus
02/14/2022, 5:11 PMoverride fun imageBitmapFromArgb(rawArgbImageData: IntArray, width: Int, height: Int): ImageBitmap {
val image = ImageBitmap(width, height, ImageBitmapConfig.Argb8888, true, ColorSpaces.Srgb)
image.asAndroidBitmap().setPixels(rawArgbImageData, 0, width, 0, 0, width, height)
return image
}
but there does not seem to be a suitable way to do the same on desktop. The Skia bitmap does not seem to have a setPixels
method.olonho
02/14/2022, 5:27 PMBitmap.makeFromImage(Image.makeFromEncoded(bytes))
?Michael Paus
02/14/2022, 5:52 PMolonho
02/14/2022, 5:53 PM