I have read a lot of questions and answers here on stackowerflow about the solution and still can't find the solution which can help to solve my problem.
So i have 2 really big images and i need to compare them.
Images are not created with imageNamed:
, so they are not cashed, so [image1 isEqual:image2]
should not work.
The only solution to compare them as i understand is this one:
- (BOOL)image:(UIImage *)image1 isEqualTo:(UIImage *)image2
{
return [UIImagePNGRepresentation(image1) isEqual:UIImagePNGRepresentation(image2)];
}
But the images have really huge sizes, so it will take a some time to compare.
Are there any properties which can help not to use method above to check if they are equal?
For example i can get image1.size
and compare it with image2.size
, it they are not equal i do not need to run method above. Any ideas? Thank you.