procedure TForm1.Button1Click(Sender: TObject);
var
jpgPic:TJpegImage;
bitPic:TBitMap;
begin
jpgPic:=TJpegImage.Create ;
with jpgPic do
begin
LoadFromFile('C:/splash.jpg');
bitPic:=TBitMap.Create ;
with bitPic do
begin
Width:=jpgPic.Width;
Height:=jpgPic.Height;
Canvas.Draw (0,0,jpgPic);
end;
Image1.Picture.Assign(jpgPic);
bitPic.Free;
end;
jpgPic.Free;
end;