I have the following swift code.
let resolution = [imageView.frame.size.width, imageView.frame.size.height]
for x in 0...Int(resolution[0]) {
for y in 0...Int(resolution[1]) {
let coordinate = [x, y]
//Find the colour of the pixel here
}
}
I want to be able to find the colour being displayed by each individual pixel in the photo. Is there a way to modify the code where I have put "//Find the colour of the pixel here" to get it to print the RGB value of the pixel at the coordinate represented by the constant coordinate?