s6luwJ0A3I
s6luwJ0A3I

Reputation: 1033

How to get the alpha of an UIImage

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

Upvotes: 1

Views: 950

Answers (1)

Pablosproject
Pablosproject

Reputation: 1424

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.

Upvotes: 2

Related Questions