There seems to be a bug in TIEImageEnAnnot.LoadFromStream that prevents loading previously saved ImageEnIOParams from stream.
procedure TIEImageEnAnnot.LoadFromStream(Stream: TStream);
//[...]
Stream.Read(dataLen, sizeof(dword));
if datalen > 0 then //@@@ SZ added this line
IECopyFrom(fData, Stream, dataLen);
end;
If dataLen = 0, then IECopyFrom copies the entire stream, and then we'll crash with an out of memory.