Page 1 of 1

ExtractMetafilesBitmaps turned on, but TMetafiles appear

Posted: Wed Oct 01, 2008 12:31 pm
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

Posted: Wed Oct 01, 2008 3:40 pm
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.