You can create a HTML file by simply use the Memo.SaveToFile method. By default embedded images will be recreated using the naming
filename_000x.png or filename_000x.jpeg
This also happens when the save dialog is used. (Save or SaveAs action)
When the same file is saved another time in the same session the existing image file will be reused. The component will automatically compress bitmap (BMP) to PNG format if the color depth is <= 8 bit and otherwise JPEG format. The compressed image data will replace the embedded, non compressed image data.
In place of metafiles (EMF, WMF) a 200 dpi PNG image will be created. The PNG information will be only used to save the image, the embedded data will not be replaced.
If you use the format string HTML-imgpath:"" embedded images will not be exported. (This behaviour used to be the default setting)
If you want to save the images to a different directory use the format string
Then the files
c:\attach\img_000x.png or c:\attach\img_000x.jpeg
will be created.
If you need to create HTML as string use the method SaveToString. Here the creation of image files must be explicitly activated using a format string like HTML-imgpath:"c:\attach\img".
Note: The double quotes are required for the -imgpath: format option!