image Object should have imagePixelColor method
imagePixelColor()function requires a path in order to get a pixel color. Sometimes we already have an image object open. It would be convenient to be able to quiz it for its pixel colors without having to open the file each time.
drawBot caches the path as image object inside, the cache is cleared when the context is done drawing
justvanrossum last edited by
You can pass an ImageObject to
im = ImageObject() with im: fill(1, 0, 0) rect(100, 100, 200, 200) print(imagePixelColor(im, (150, 140)))