2

I am quite new to programming and I am trying to figure out how you can loop through all the pixels in a UIImage in Swift. I am doing this so I can test the Red, Blue, Green, and Alpha color values of each pixel to see if it is equal to a specific color I input.

Pickle2113
  • 61
  • 6
  • Here is a link on how to get the RGBA value for 1 specific pixel: http://stackoverflow.com/a/36236716/4621265 So if you loop over the width and height of an image while running that code you could get it. (I doubt this way is very efficient though) – Houwert Mar 02 '17 at 00:57
  • Thanks. I might of solved the problem I was having now as well but I'll keep that link in mind. – Pickle2113 Mar 02 '17 at 04:35

0 Answers0