I then manipulate bytes etc. Then, I want to update the whole canvas with the bytes, but I can't create an Image from raw bytes
val i = Image.makeFromEncoded(bytes) // exception
val i = Image.makeFromPixmap(Pixmap.make(ImageInfo.DEFAULT, Data.makeFromBytes(this.bytes),this.bytes.size)) // exception
canvas.drawImage(i, 0f, 0f)
I get the canvas bytes like this:
I then manipulate bytes etc. Then, I want to update the whole canvas with the bytes, but I can't create an
Image
from raw bytesHow to create an image from the raw bytes?