UIImage+BlurAndDarken

ios-darken-image-with-cifilter

UPDATE: You shouldn’t use this any more – Apple’s UIImage+ImageEffects code (released alongside iOS 7) achieves this same result – so go find it!

I was frustrated trying to get a CIFilter that’d work to darken an image by 50% (the equivalent, in photoshop, to adding a 0.5-alpha black layer in front of a picture). An hour later, I figured it out. Enjoy!