Size of stored data

General TRichView support forum. Please post your questions here
Post Reply
gman00
Posts: 1
Joined: Thu May 31, 2012 8:35 pm

Size of stored data

Post 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
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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)
Post Reply