Iphone mask color: clear background color

I have a series of avatars; each of them has a bright pink background RGB: 255.0 255.

Instead of going through each avatar and manually removing the pink background; is there any way to make Objective-C for background removal (masking) for me?

Avatar example:

alt text http://img39.imageshack.us/img39/2645/bluegem.png

One thing I'm worried about is that masking is done on the fly and can cost memory; Is this what I should worry about?

Also, let me say that I put avatars in the spritesheet; can i apply the mask once and work with it?

Thank you for your help.

+3
source share
2 answers

. CGImageCreateWithMaskingColors. , , . . :

+3

, NSArray addObject:yourButton , , , , :

for (UIButton *custom in globalButtonArray) {
    custom.backgroundColor = [UIColor clearColor];
}
0

Source: https://habr.com/ru/post/1759734/


All Articles