0

I am building an application, where I need to compare 2 images and highlight the difference. For example I am comparing UIImage1 with UIImage2, where both the images are same, except there is an extra small square object in UIImage2. I need to highlight the extra square object with red color in the UIImage2.

I am not sure, how I can achieve this.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Soumalya Banerjee
  • 1,966
  • 3
  • 22
  • 28

1 Answers1

2

You can subtract two UIImages by blending them with the blendmode "kCGBlendModeDifference".

Here is an example done, you just have to change the blendmode: https://stackoverflow.com/a/3188761

Community
  • 1
  • 1
KugelnMMXVI
  • 165
  • 8