CompareBitmaps Method (SystemFunctions)

Action

Compares two bitmaps. If the color depth of the bitmaps is less than 24 bit, then the images are first converted to 24bit color depth. If a mask file is provided, only the white pixels of the mask file are relevant for the comparison. The comparison succeeds if the number of mismatched pixels is less then the value provided by pixelTolerance. Returns false if the provided bitmaps do not have the same dimensions.

Syntax

C#

bCompare = CompareBitmaps (lhs, rhs [, maskFileName, pixelTolerance]);

VB

bCompare = CompareBitmaps (lhs, rhs [, maskFileName, pixelTolerance])
Variable Description
bCompare True if the bitmaps are equal, false otherwise. Boolean.
lhs The path to the first file. Can be either an absolute path or a path relative to the current working directory. String.
rhs The path to the second file. Can be either an absolute path or a path relative to the current working directory. String.
maskFileName Optional: The path to the mask file. Can be either an absolute path or a path relative to the current working directory. String.
pixelTolerance Optional: The allowed tolerance. Integer.