Getting transparent pixels in UIImage
I am looking for a way to get the transparent pixels in a UIImage, I have googled this 开发者_Go百科but have found little or nothing. Does anyone know how I can do this? I am looking for the easiest way possible too!
Thanks!
If you initialize an UIImage with a transparent or semitransparent image form disk, all the pixels that were transparent, still remain transparent. What is it that you actually want to achieve, maybe I’m misunderstanding something.
Anyway, just save a transparent image (PNG would probably be best) to disk, add it to XCode project and then just:
something = [UIImage imageNamed:@"some.png"];
Has worked fine for me so far.
精彩评论