Hi,
We recently upgraded to the latest version (6.27) from a fairly old version (6.14) and we are now getting exceptions when attempting to load saved RTF data which contained images.
Here is how we currently save the data:
var
SS: TStringStream;
WS: WideString;
W: Longint;
begin
SS := TStringStream.Create('');
try
Editor.SaveToStream(SS);
WS := SS.DataString;
Result := AStream.Write(@WS[1], Length(WS) * 2, @W);
finally
SS.Free;
end;
end;
Alles anzeigen
And to load back in we just use Editor.LoadFromString with WriteObjectMode set to wobRTF. I have tried enabling the $DEFINE PNGIMG directive in the WPINC.inc file and re-compiling but that didn't appear to change anything. I have read through the release notes posted on this thread and I can see there has been some changes to the save implementation, however, nothing seems to be jumping out at me. There was a lot of changes between the versions so I may just be missing it.
Any ideas what I need to do to fix this?
PNG load error:
ZitatThe file being read is not a valid "Portable Network Graphics" image because it contains an invalid header. This file may be corrupted, try obtaining it again.
JPEG load error:
ZitatJPEG error #11 (apparently means "Sampling factors too large for interleaved scan")
WMF load error:
ZitatMetafile is not valid