• I used the following code:
    obj := TWPOImage.Create(RichText1.Memo.RTFData);
    obj.LoadFromFile(ImageFileName);
    RichText1.TextObjects.Insert(obj);

    But only .bmp files are accepted. What should I do to permit the retrieval of jpg or gif files?

    Also I use:
    RichText1.TextLoadFormat := 'RTF';
    RichText1.LoadFromFile(AFileName);

    To open a file. If the file contains anything but a .bmp graphic, it will not open.

    Can you help? I had no such problems with WPTools3, but the new version 5 is different.

    Thanks,

    --Bill
    tavolga@aol.com

    • Offizieller Beitrag

    Hi,

    Some of the graphic support is optional. Please check out the unit WPObj_Image.pas

    // Optional graphics libraries are used when this compiler symbols are defined
    // PNGLIB: Support for PNGLib http://pngdelphi.sourceforge.net/
    // GIFIMG: Support for GifImage http://home20.inet.tele.dk/tolderlund/delphi/
    // GRAPHICEX: PNG and GIF with GraphicEx : http://www.soft-gems.net/

    Also in WPTools 3 you need to activate support for other graphic formats. PNG support was not possible at all, now PNG and JPG can be saved and loaded in way compatible to other RTF readers.

    Julian