Compares one image with another on a pixel by pixel basis.
Syntax

[C#]

bool Diff(Canvas inCanvas);
bool Diff(XImage inImage);

[Visual Basic]

Function Diff(inCanvas As Canvas) As Boolean
Function Diff(inImage As XImage) As Boolean
Params
Name Description
inCanvas The other image.
inImage The other image.
return true if the images are different, false if they are identical
Notes

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.

Example

None.