Comparing 2 images

Hi!

I’m quite new to flash and I was wondering if it is possible to make flash compare 2 images and generate a score. So what I mean is this:

1 There is a image in flash.
2 There is a image that the user has drawn in the flash game (it’s a drawinggame)
3 Those 2 images need to be compared
4 Flash generates a score from 1 to 100 on how much the 2 images match eachother.

Is this posssible? If yes, how? Can someone help me in the right direction?