Page 1 of 1

Convert to external pictures

Posted: Tue Nov 28, 2017 1:50 pm
by Jim Knopf
Hi,

my intention is to change the handling of pictures. Now they are included in documents but I will change to external pictures by disabling rvfoSavePicturesBody. So far so good.

But what can I do with documents that just contain pictures? What is the best way to stay compatible: new method - old projects? The problem is not so simple, because a Patchwork project may contain hundreds of single rvf files (each scene one file). Can I detect wether a file contains its pictures that I can expoert them? And, if, what is the best way to export them and set the new documents state?

Thank you in advance
Martin

Re: Convert to external pictures

Posted: Tue Nov 28, 2017 2:40 pm
by Sergey Tkachenko
Even if your document does not contain pictures, users can paste or drag&drop RTF containing internal pictures, and you need to handle them somehow. The best place to do it is before saving.
As for old documents, you can re-save them with excluded pictures options.

Before saving, you can enumerate all pictures in the document, find internal pictures and make them available externally.
See the demo in TRichView\Demos\DelphiUnicode\Assorted\Graphics\ShareImages\
The procedure for image processing before saving is TForm1.SaveAllUnknownImages.