I have a UIImage. I need to find out its alpha value. Can someone explain it to me in detail, providing links to any references and also source code of how to go about this. Please don't provide answers for finding out the alpha of the UIImageView because I do NOT need that. Thanks in advance
Asked
Active
Viewed 920 times
1
-
What do you *exactly* mean by UIImage alpha ? – A-Live Apr 10 '13 at 11:04
-
`imageView.alpha` will give you alpha – Anoop Vaidya Apr 10 '13 at 11:07
-
@AnoopVaidya he said not to use UIImageView. UIImage has not the property alpha – Pablosproject Apr 10 '13 at 11:09
-
hi i am also facing the same see once http://stackoverflow.com/questions/11686489/how-to-get-the-alpha-channel-alone-in-ios – Arun Apr 10 '13 at 11:16
-
You have to obtain a *CGImageRef*. Once you have it you can use the method *CGImageGetAlphaInfo* that return the information of the alpha channel of the image. – Pablosproject Apr 10 '13 at 11:08
1 Answers
2
You have to obtain a CGImageRef. Once you have it you can use the method CGImageGetAlphaInfo that return the information of the alpha channel of the image.

Pablosproject
- 1,374
- 3
- 13
- 33