bitmaps not saved


I want to save the content of a bitmap on screen to a blob (a signature) field.

I use the following code:

    aopdrbon.HandtekeningDatum := Now; //a Datefield

    Bmp := SignRectangle.MakeScreenshot; //making a screenshot of the signature on screen

    tempFn := GetHomePath + PathDelim + 'Documents' + PathDelim + 'signature.jpg';

    bmp.SaveToFile(tempfn); //Saving the bitmap to disk, the jpeg image on disk is OK

    BytesStream := TBytesStream.Create(aopdrbon.Handtekening);


      BytesStream.LoadFromFile(tempfn); //Saving to the BytesStream as per documentation




The aOpdrbon objects gets saved because the "HandtekeningDatum" is written to database. But the blobFields are never filled.

I am using 2.2.0

What type is Handtekening property? Is it TBlob? If it is, then in current version the TBytes returned by TBlob is a copy of internal data, not the data itself. Please contact us directly so I can send you a patch to fix this.