UIImage grayscale thresholding
===

I want to threshold a grayscale UIImage. What's the easiest way to do this?

I think I have to get the bitmap of the UIImage and then compare it to some value and then set it to either 0/255. How to get the bitmap?