Board index » delphi » Paradox table with Blob field (jpg)

Paradox table with Blob field (jpg)

How can I do this?
Has someone a step by step example?
 

Re:Paradox table with Blob field (jpg)


Earl F. Glynn has an example by John Herbster. The URL wrapped.
http://www.efg2.com/Lab/Library/Delphi/Graphics/JohnHerbster_T_Jpeg_1...
991207.zip

--
Andrei Fomine.
DbAltGrid - multi-line layout, RTF and graphics of any kind in DBGrid.
Transfer@once - full-blown clipboard and drag-and-drop transfer in native
MS Office formats to/from any control.
www.quasidata.com

Quote
"WS" <autodid...@ig.com.br> wrote in message news:3ccafb15_2@dnews...
> How can I do this?
> Has someone a step by step example?

Re:Paradox table with Blob field (jpg)


Quote
>How can I do this?
>Has someone a step by step example?

You don't say what you want to do.  If you want to load a jpeg into a paradox
blob field see Tblobfield.loadfromfile method.  If you want to display a jpeg
stored in a blobfield here is some sample code.

procedure TForm1.Table1AfterScroll(DataSet: TDataSet);
var
  MS: TMemoryStream;
  J1: TJPEGImage;
begin
  J1 := TJPEGImage.Create;
  MS := TMemoryStream.Create;
  try
    TBlobField(DataSet.Fieldbyname('myBlob')).SaveToStream(MS);
    MS.Seek(0,soFromBeginning);
    with J1 do begin
      PixelFormat := jf24Bit;
      Scale := jsFullSize;
      Grayscale := False;
      Performance := jpBestQuality;
      ProgressiveDisplay := True;
      ProgressiveEncoding := True;
      LoadFromStream(MS);
    end;
    if MS.Size >0 then
      Image1.Picture.Assign(J1)
    else
      Image1.Picture.Assign(nil);

  finally
    J1.Free;
    MS.Free;
  end;
end;

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads