Let's take this step by setp:
a lot of people here were stating that the EXIF data could be used to verify the picture. Sorry, but no. EXIF data are not cryptographcally secured, so they can be manipulated quite easily. For people who need unforgeable digital pictures (usually epert witnesses), there are digital cameras out there that will add a cryptographic key to the image data, which have so far been impossible to falsify. No guarantees for the future, though - with the advent of quantum computing, this kind of encryption/authentication would also need to incorporate some form of quantum encryption.
Analogue (i.e. film) photography is usually secure from this angle. It could be manipulated, sure - but only as long as you won't have the negatives forensically examined.
Now, looking only at the image data. Let's assume each of the two contestants has brought their original image - either the negative, the RAW dataset or the JPEG - to the courtroom. The problem now is to determine whether the picture on the website, which most likely is a reduced resolution JPEG image, is derived from either the one or the other.
As in all scientific processes, you won't be able to get 100% confidence in either outcome.
But if the two 'originals' were taken at a different time, with a different camera, there will be differences in the originals. At the very least, the noise pattern of the sensor would be different, at the most, the image contents themselves would be different (imagine the leaves of a tree moving in the wind, or the sun shining at a different angle). The problem is now, are those differences large enough to survive the compression/size reduction process that lead to the website image? If not, the two resulting compressed pictures are indistinguishable.
As an example: imagine taking that picture of a stone on desk, in a closed room (no windows, controlled artificial light from a DC source) twice in a row. Delete the EXIF data, only keep the RAW image data. Imagine that the camera uses a very good 14 bit sensor/ADC and that the exposure is perfect, so that all of the noise is in the lowest 4 bit of ADC output. Now run that image through a 8 bit JPEG compression. The lowest 5 bits of sensor information are discarded, the 6th bit is used for rounding - all of the difference information is lost.
So, while you can easily distinguish the two originals, it will be impossible to distinguish the compressed images created from the two originals - in this special case.
Again, for the real life case, it boils down to whether the differences between the pictures are large enough to survive the compression process. Usually, they will be - at least for any picture worth fighting over.
As for the software to detect the differences: as long as you have the images as digital data, a simple diff operation (i.e. subtract one image from the other - binary) will show you the differences at once.
As to your argument that 'the computer' 'believes' that the two pictures are identical: it will only do so if manipulated. Prosecution could request either a detailed software audit, demonstrate the comparison of the two RAW data sets themselves or show a similarly manipulated experiment. But the problem for the prosecution remains: defense can easily show that two different originals can result in two identical compressed images (on the binary level), thereby winning the case under the assumption of 'inncent until proven guilty'.