views:

427

answers:

1

Suppose I have image canvas or previously loaded image which supports transparency (gif/png). What are the steps to implement changing transparency for the image, but not for the whole image, but only a part of it? I undestand I should use CGContext, but i'm lacking the details.

+2  A: 

1) create a memory buffer

2) cast it into a CGContext with alpha by using CGBitmapContextCreate

3) draw your image into it with CGContextDrawImage

4) modify the mask via the buffer you created in step 1.

5) $$$

Rhythmic Fistman
lol, +1 for step number 5. :)
Dana Holt