uses Jpeg;
procedure TForm1.Button1Click(Sender: TObject);
var
JpegIm: TJpegImage;
bm: TBitMap;
begin
if OpenDialog1.Execute = false then
Exit;
bm := TBitMap.Create;
JpegIm := TJpegImage.Create;
JpegIm.LoadFromFile(OpenDialog1.FileName);
bm.Assign(JpegIm);
Form1.Canvas.Draw(0, 0, bm);
bm.Destroy;
JpegIm.Destroy;
end;
|