Image1.Picture.Assign(TBlobField(DataModule2.ADOTable1.FieldByName('Photo')));
If TBlobField(query.FieldByName('Photo')).BlobSize>0 then begin jpg:=TJpegImage.Create; try jpg.Assign(TBlobField(query.FieldByName('Photo'))); Image1.Picture.Assign(jpg); finally jpg.Free; end; end;
procedure TForm4.DBImage1Click(Sender: TObject);varBitmap: TBitmap;BS: TADOBlobStream;begintry BS:= TADOBlobStream.Create(TBlobField(DataModule2.ADOTable1.FieldByName('Photo')), bmRead); BS.Seek(82, soFromBeginning); Bitmap:= TBitmap.Create; Bitmap.LoadFromStream(BS); DBImage1.Picture.Graphic:= Bitmap;finallyBitmap.Free;BS.Free;end;end;