I need to create an ImageBitmap from raw ARGB pixels contained in an IntArray. On Android I do this like this
override 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.