I am trying to find a way save the Params of an image in a TImageEnMView to a database table, then load these from the table to read the EXIF properties of that image. I am using the ABS database (similar to BDE).
I save using this code:
BlobStream := TABSBLOBStream(dmDatabase.TblImages.CreateBlobStream(TblImages.FieldByName('Params'), bmWrite));
try
ImageEnMViewFolder.MIO.Params[idx].SaveToStream(BlobStream);
finally
BlobStream.Free;
end;
If I then try and load the params using this:
BlobStream := TABSBLOBStream(tblImages.CreateBlobStream(tblImages.FieldByName('Params'), bmread));
try
frmMain.ImageEnViewMain.IO.Params.LoadFromStream(Blobstream);
finally
BlobStream.Free;
end;
I get this error:
Invalid TIOParams stream. You cannot use TIOParams.LoadFromStream or LoadFromFile to load parameters from image files.
I'm obviously going about this the wrong way. My question is, what is the best way to save an image file's Params, then load it again from a stream?
Patrick
ImageEn 7.0.0, Delphi 10.2, Windows 10