How can I simulate light using mask images on the iPad? [duplicate]

I want to have a picture as a background, say this:

Then I would like to apply a mask, just a circle with blurred edges, so it looks like this:

The idea is to simulate something emitting. Is this a good way of simulating light or should I use another method? And if so how? And I'm not really sure how to apply this method.

marked as duplicate by Nicol Bolas, Josh♦, bummzack, MichaelHouse♦, Jesse Dorsey♦Aug 15 '12 at 20:32

• I think your question is a duplicate of the one I linked. For posterity, I have also edited your question to contain the same content as the SO question you linked to, since I have also flagged the SO question to be closed/deleted as a duplicate of this one (it is more appropriate here). – Josh Aug 11 '12 at 18:13
• well you removed the iPad out of the title so no i got an answer for mac osx not for iOS so yeah thanks.. – user1586195 Aug 11 '12 at 20:45
• @user1586195 You can always edit your post and add "iPad" back in if that's so important to you. Also: The Core Image Framework is available on iOS, so the answer you got applies to iOS as well. – bummzack Aug 12 '12 at 8:51

You could use the Core Image CISpotLight filter:
CIImage *inputImage = // your image here