How do I find alpha values for the various pixels of a CGImage
?
There is an array returned by the decode
property of the CGImage
. Would probing the values of this array be required?
Or should I look at the dataProvider
property?
I want to iterate through the pixels and get the alpha value for each pixel.
Edit:
The question linked to as duplicate is an objective-c question. I only know swift.