Reputation:
Is there a simple way to check the overall color of a UIImage?
//For example
if ([someImage isMostly:[[UIColor whiteColor] CGColor]] {
NSLog(@"This image is mostly white!");
}
I would imagine it's not that simple though. One approach could be possibly to pick a few random coordinates and average the colors together. Am I on the right track?
Upvotes: 2
Views: 112
Reputation: 104145
One approach is to create the image histogram and then simply pick the most frequent color.
Upvotes: 2