I'm trying to work on raw pixels of an image using swift language in iOS development. My target is to iterate and log pixel values / color space information of image using CGContextDrawImage and CGContextRef methods. Like the output in attached screenshot. Can anyone guide me through this ? I so far haven't come across a solution.