setPixelColor() image Object?

  • hi,
    maybe I am not able to find it in the documentation.
    But is there a way to set the pixel color at (x,y) of an image object?
    thanks j

  • admin

    not directly...

    you can load the image as an ImageObject and use it as a context to draw something, a pixel at a specific place.

    im = ImageObject("")
    with im:
        fill(1, 0, 1)
        rect(0, 0, 10, 10)
    image(im, (10, 10))