mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-25 08:48:51 -05:00
3fef7ac7ed
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@475 3f818213-9676-44b0-a9b4-5e4c4e03d09d
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.
|