In the AU Library (currently in beta – see earlier posts for download links) you can store an RGB image in an object called an AUMultiField
, where you can do lots of things to do it, including drawing it on the screen.
Now you can also draw it using a mask. Create any AUField
with shades of gray, and tell the library to use this as a mask when you draw your picture. Values of the mask from 0 to 1 control the opacity of the corresponding pixels, from fully transparent to fully opaque. In other words, the mask is an alpha layer, but it’s better than Processing’s built-in alpha because the values are stored in floats, giving them much more range and precision. The layer is also separate from the pixels, making it easier and faster to modify.
Continue reading