The difference between the two images is calculated pixel by
pixel and stored as an intensity map in the image. The contents of
the original image will therefore be changed and set to the
intensity map.
For each pixel, the difference of the color channels is
calculated as an absolute value and subtracted from 0xFF (white).
Therefore, if the two images are identical the intensity map will
be white.
This operation is only valid for raster images. If the canvases
are not raster based they will be rasterized.
|