@BigChimp,Thank you. I have install Vampyre and the code is changed:
{$I ImagingOptions.inc}
.....
var
dTime: DWord;
iCount: Integer;
AMS: TMemoryStream;
AJpg: TMultiImage;
ADlg: TOpenDialog;
sJpg: string;
begin
ADlg := TOpenDialog.Create(nil);
AMS := TMemoryStream.Create;
try
if not ADlg.Execute then
Exit;
AMS.LoadFromFile(ADlg.FileName);
SetLength(sJpg, AMS.Size);
AMS.Position := 0;
AMS.Read(sJpg[1], AMS.Size);
finally
FreeAndNil(AMS);
FreeAndNil(ADlg);
end;
dTime := GetTickCount;
iCount := 0;
while (GetTickCount - dTime) < 5000 do
begin
AMS := TMemoryStream.Create;
AJpg := TMultiImage.Create;
try
AMS.Write(sJpg[1], Length(sJpg));
AMS.Position := 0;
AJpg.LoadMultiFromStream(AMS);
finally
FreeAndNil(AJpg);
FreeAndNil(AMS);
end;
Inc(iCount);
end;
Caption := Format('JpegFile Result: %f/s', [iCount / 5]);
end;
================
But the result is:58.20/s
