SCAR Code:
program SlideShow;
var
i, lx, ly, tx, ty: Integer;
pic: array of Integer;
procedure Declareanddraw;
begin
SetLength(pic, 20);
for i := 0 to 9 do
begin
pic[i] := Loadbitmap('C:\bit\images_00'+inttostr(i)+'.bmp');
GetBitmapSize(pic[i], tx, ty);
if (tx > lx) then
lx := tx;
if (ty > ly) then
ly := ty;
SafeDrawBitmap(pic[i], GetDebugCanvas, random(150),random(150));
Wait(1000 + Random(500));
end;
for i := 10 to 19 do
begin
pic[i] := Loadbitmap('C:\bit\images_0'+inttostr(i)+'.bmp');
SafeDrawBitmap(pic[i], GetDebugCanvas, random(150),random(150));
Wait(1000 + Random(500));
end;
for i := 0 to High(pic) do
try
FreeBitmap(pic[i]);
except
end;
end;
begin
DisplayDebugImgWindow(600, 600);
declareanddraw;
Writeln('Please change line 36 into: ' + Chr(13) +
'DisplayDebugImgWindow(' + IntToStr(lx + 150) + ', ' + IntToStr(ly + 150) + ');');
end.