Thread: Jpg <---> Blob

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    23
    Rep Power
    0

    Jpg <---> Blob


    Would you please point me to a working example of posting jpg image to FB Blob, as well as the reverse (Blob to jpg)
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Location
    Plovdiv. Bulgaria
    Posts
    224
    Rep Power
    12

    Post


    Read picture from database with Delphi something like this:
    Code:
      
    var
      JpegImage : TJPEGImage;   
      MemStream : TMemoryStream;
    begin
    
      MemStream := TMemoryStream.Create;
      qrPicturePICTURE.SaveToStream(MemStream); //IBQuery with filed that reads data from BLOB filed
      JpegImage := TJPEGImage.Create;
      MemStream.Seek(0,soFromBeginning);
      JpegImage.LoadFromStream(MemStream);
    end;

IMN logo majestic logo threadwatch logo seochat tools logo