Using xor to calculate percentage of difference of two equally sized images