Thanks for your code. It works a treat. I did find two ways to get this to work without the for loops, presumably using vector transforms in the CPU or GPU. One way is to use an NSImage with a...