I'm trying to get an RGB value of a pixel from a CGImageRef object. I know that I need to create a context or something but, how do I do this?
Asked
Active
Viewed 4,550 times
3
-
see my answer on [How to detect a RGB on a point][1] [1]: http://stackoverflow.com/questions/9270923/how-to-read-rgb-pixel-data-on-iphone/22379366#22379366 – Mohit Tomar Mar 13 '14 at 13:14
1 Answers
3
-
1I think [this one](http://stackoverflow.com/questions/1042830/retrieving-a-pixel-alpha-value-for-a-uiimage) was better -- it does it with a one pixel image instead of rendering the whole image to grab one pixel. – David Koski Apr 03 '12 at 23:03