Difference between revisions of "SimilarBitmaps"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function SimilarBitmaps(const Bmp1, Bmp2, Tol: Integer): Boolean; </source> ==Availability== SCAR Divi 3.30 > Current ==Descr...") |
(No difference)
|
Latest revision as of 00:49, 17 December 2011
Definition
function SimilarBitmaps(const Bmp1, Bmp2, Tol: Integer): Boolean;
Availability
SCAR Divi 3.30 > Current
Description
This function returns true if all pixels of 2 given bitmaps specified by Bmp1 and Bmp2 are within the tolerance range of each other specified by Tol. This is determined using the active tolerance algorithm which can be changed with ColorToleranceSpeed. An extended function with additional functionality is available as SimilarBitmapsEx.
Example
var b1, b2: Integer; begin b1 := BitmapFromString(100, 100, ''); b2 := BitmapFromString(100, 100, ''); WriteLn(SimilarBitmaps(b1, b2, 5)); FastSetPixel(b1, 5, 5, 255); WriteLn(SimilarBitmaps(b1, b2, 5)); end.
Output:
1 0