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("http://f.cl.ly/items/1T3x1y372J371p0v1F2Z/drawBot.jpg")
    
    with im:
        
        fill(1, 0, 1)
        rect(0, 0, 10, 10)
        
        
    image(im, (10, 10))
    

Log in to reply