What's the best way to mask part of a PImage from being changed?
For example, say I have a PImage object of a black and white house. The house itself is white and the windows/doors are black on the image. Ideally I would like to change the color of just the white section without affecting the black areas, however since it is all one object accomplishing this is tough (at least for a processing newbie like me).
Is there an easy way to do this?
My initial thought was to loop over the pixels in the image and if if they aren't black then change them, otherwise do not. Is this the usual way an effect like this is accomplished? Thanks!
1