ExtractMetafilesBitmaps turned on, but TMetafiles appear

General TRichView support forum. Please post your questions here
Post Reply
martindholmes
Posts: 131
Joined: Mon Aug 29, 2005 12:03 pm

ExtractMetafilesBitmaps turned on, but TMetafiles appear

Post by martindholmes »

Hi there,

When I load RTF files into a TCustomRichViewEdit with ExtractMetafilesBitmaps set to True, I still find that graphics appear as TMetafile. Is this right? Is there an easy way to convert each TMetafile to a TJPEGImage? When I'm saving out into a custom format, I need to turn TMetafiles into a web-friendly format.

All help appreciated,
Martin
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This options allows to load metafiles as TBitmap only if this metafile contains only a bitmap and nothing else. MS Word usually saves bitmaps in RTF in this way (embedded in metafile). If metafile contains some other drawing, it will be loaded as TMetafile.

As for converting all images to another format, see here:
http://www.trichview.com/forums/viewtopic.php?t=761
C++ code there converts all image formats to Jpegs by assigning them to TBitmap, then assigning this TBitmap to TJPEGImage. As far as I remember, a direct assignment TMetafile to TJPEGImage is not supported.
Post Reply