保存同楼上
显示载入jpeg格式的图片如下
procedure TFFrm.LoadPicture;
var
lBlobStream: TStream;
lGraphic: TGraphic;
begin
DBImage1.Picture.Graphic:=nil;
if ADoquery1.Eof then
exit;
lGraphic:=nil;
lBlobStream := ADoquery1.CreateBlobStream(ADoquery1.FieldByName(picture), bmRead);
try
if lBlobStream.Size > 1 then
begin
lBlobStream.Position := 0;
lGraphic := TJpegImage.Create;
lGraphic.LoadFromStream(lBlobStream);
DBImage1.Picture.Graphic := lGraphic;
end;
finally
lBlobStream.Free;
lGraphic.Free;
end;
end;