How to get RGB value of a pixel from a CGImageRef object?

core-graphics, iphone, pixel

Solution

This post shows you how to do it.

Problem

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?

Original source

Related problems