Reading pixel values (rgb or brightness) on coordinations



  • Hello all,

    Something I do a lot of times in Processing is load an image or video and read the pixel values at specific coordinates to use as values for an animation. It this something that can be done in Drawbot?

    It can probably be done in Python with the image library, but I have no further experience with coding in Python.

    In short I want to control the weight of a letter on a specific location based on a separate black and white images input (black is 0, white is 100%). Any ideas?



  • hello @snaders,

    yes, you can read image pixel values with imagePixelColor(). it’s a bit slow though, use it with caution… good luck!



  • Thanks @gferreira, I somehow completely missed that when going through the documentation. That's exactly what I need haha. I only have to go through through a single line of pixels, so hopefully the speed won't matter that much.


Log in to reply