Thread
#compose
    k

    Kirill Grouchnikov

    1 year ago
    There are examples of creating an empty
    ImageAsset
    and drawing on it - such as
    ImageAssetSample
    , but it's a chicken-and-egg problem. In order to be able to draw a dynamic "bitmap" onto it, such a bitmap would first need to already exist.
    Nader Jawad

    Nader Jawad

    1 year ago
    Similar to Android you can create an ImageAsset and pass it to the constructor of a Canvas and to draw into the ImageAsset (now called ImageBitmap)
    k

    Kirill Grouchnikov

    1 year ago
    But again, how do I "draw" an array of ints / pixels onto it?
    This approach works to draw shapes, lines, points, etc. But not a dynamically created image.
    Nader Jawad

    Nader Jawad

    1 year ago
    Discussed offline. We will be adding a
    setPixels
    API to ImageAsset to configure the pixel information if it is retrieved from elsewhere. Thanks!
    k

    Kirill Grouchnikov

    1 year ago
    Meanwhile I filed https://github.com/JetBrains/compose-jb/issues/111 as I can't even create an empty bitmap on desktop