WPCubed Product Support

PNG won't add to doc, but jpg and bmp will (delphi XE)

I have wpObj_Image in my uses clause, it has DEFINE PNGLIB defined. I can select png, bmp and jpg files. The latter 2 types will add to the document and display, but the png won't. You can see the text expand and then immediately shrink when WPRichText1.TextObjects.Insert(img) is executed.

procedure TfrmEditTemplate.actnODgraphicAccept(Sender: TObject);
var
  img: TWPOImage;
begin
  img := TWPOImage.Create(WPRichText1.Memo.RTFData);
  img.LoadFromFile(actnODgraphic.Dialog.FileName);
  WPRichText1.TextObjects.Insert(img);
end;

By the way, PNGDELPHI is no longer available. Codegear challenged it, and asked for it to be removed from free downloads.

#1 ♥ 0
4.4k Views 2 users read 1 min
support

Hi,

I also confused the compiler symbol. It must be PNGIMG, not PNGLIB .

You can activate it when you have Delphi 2009 or later.

Julian

#2 ♥ 0

Julian, thanks, PNGIMG did the trick.

Jeremy

#3 ♥ 0
This category is archived. No new posts are possible.