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
Keeping PNGs as PNGs in HML export
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
For C++, the code is
It must work.
If it does not, please send me a simple project reproducing the problem.
Code: Select all
RVGraphicHandler->RegisterHTMLGraphicFormat(__classid(TPNGObject));
If it does not, please send me a simple project reproducing the problem.