How to check an image I just retrieved with an image already in WP DB

Hi

I have retrieved an image from an external source- now I want to see if this image is the same as an existing image for which I have the post ID (the image is an attachment post)

how do I do this?

Thanks,
Arvind.