procedure Tfrm_sfxm.popmnuitm_imageClick(Sender: TObject);
var
jpg:tjpegimage;
extname,fname:string;
begin
tblxmxgwj.Insert;
if OpenPictureDialog1.Execute then
begin
ext:=extractfileext(fname);
fname:=OpenPictureDialog1.FileName;
extname:=uppercase(extractfileext(fname));
if extname='.BMP' then DBImage1.Picture.LoadFromFile(fname);
if (extname='.JPG') or (extname='.JPEG') then
begin
jpg:=Tjpegimage.Create;
try
jpg.LoadFromfile(fname);
DBImage1.Picture.Graphic.Assign(jpg);
finally
jpg.Free;
end;
end;
end;
end;