mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-04 14:42:23 -05:00
32 lines
722 B
Plaintext
32 lines
722 B
Plaintext
|
program new;
|
||
|
var
|
||
|
p1, p2: TPointArray;
|
||
|
w, h: integer;
|
||
|
i, col: integer;
|
||
|
bmp: integer;
|
||
|
|
||
|
begin
|
||
|
SetColorToleranceSpeed(2);
|
||
|
bmp := LoadBitmap('/home/merlijn/Pictures/Mooi/Carina_1_by_Eeitam.png');
|
||
|
SetTargetBitmap(bmp);
|
||
|
GetClientDimensions(W, H);
|
||
|
writeln(inttostr(w) + ' : ' + inttostr(h));
|
||
|
|
||
|
for i := 0 to 100 do
|
||
|
begin
|
||
|
col := Random(clWhite);
|
||
|
writeln(inttostr(col));
|
||
|
FindColorsTolerance(p1, col, 0, 0, W - 1, H - 1, 40);
|
||
|
FindColorsToleranceOptimised(p2, col, 0, 0, W - 1, H - 1, 40);
|
||
|
writeln(inttostr(length(p1)) + ' : ' + inttostr(length(p2)));
|
||
|
if(length(p1) <> length(p2)) then
|
||
|
writeln('wat!');
|
||
|
|
||
|
setlength(p1,0);
|
||
|
setlength(p2,0);
|
||
|
|
||
|
end;
|
||
|
|
||
|
FreeBitmap(bmp);
|
||
|
end.
|