ImageCompareTool using canvas and javascript