Keeping PNGs as PNGs in HML export

General TRichView support forum. Please post your questions here
Post Reply
EricNat
Posts: 11
Joined: Mon Feb 17, 2014 7:43 pm

Keeping PNGs as PNGs in HML export

Post by EricNat »

We have a legacy app on BDS 2006 that we have not had the time to upgrade yet. In an HTML export from TRichView, all of the embedded images are converted to JPG. The PNGs fail in this conversion, presumably because it's not supported on BDS 2006 C++ Builder. I have added the PNGImage unit to the code and tried:

RVGraphicHandler->RegisterHTMLGraphicFormat(TPNGObject);

To get it to save the PNGs as native PNGs instead of trying to convert them to JPGs.

This will not compile - "Improper use of typedef 'TPNGObject'" is the error. I tried wrapping it in a __classid(). This compiles but it's still attempting to convert the PNG images to JPG.

Can someone help? We would like the PNGs to just stay as PNGs.

Thanks
Sergey Tkachenko
Site Admin
Posts: 17522
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

For C++, the code is

Code: Select all

RVGraphicHandler->RegisterHTMLGraphicFormat(__classid(TPNGObject)); 
It must work.
If it does not, please send me a simple project reproducing the problem.
Post Reply