C program to analyse two jpeg images and return a measure of the difference between them