Page 1 of 1

Size of stored data

Posted: Thu May 31, 2012 8:42 pm
by gman00
Hello,

I am interested in using TRichView. My biggest concern is the size of the saved file. I have taken a MS Word doc, and copied/pasted it into one of the TRichView demos (Editor1) and saved it to disk. MSWord file size is 680K, while RVF size is 3396K. Choosing a different MSWord file (purely text with formatting, no graphics, MSWord size is 27K, RVF size is 53K. Is this normal? (Note that binary save mode is turned on).

Thanks
GS

Posted: Sat Jun 02, 2012 8:06 am
by Sergey Tkachenko
The most probably, this is because of png images inside this document.
By default, they will be loaded as bitmap, so the file size will be increased.

To enable PNG support, call this code (one time, when the application starts):

Code: Select all

  RV_RegisterHTMLGraphicFormat(TPngImage);
  RV_RegisterPngGraphic(TPngImage);
  RegisterClass(TPngImage);
(I assume that you use Delphi 2009 or newer. For older versions, you need a thirdparty PNG class)