Page 1 of 1

[Solved] PNG Export in BCB5

Posted: Tue Mar 28, 2006 9:48 am
by 9345036
How can I use PNG Export in BCB?

Code: Select all

#include <TeePNG.hpp>
TPNGExportFormat* PNG = new TPNGExportFormat;
delete PNG;
This causes

[Linker Error] Unresolved external 'Teepng::TPNGExportFormat::' referenced from ...
[Linker Error] Unresolved external '__fastcall Teepng::TPNGExportFormat::TPNGExportFormat()' referenced from ...

Posted: Mon Apr 03, 2006 10:02 am
by Pep
Hi,

you can do :

Code: Select all

#include "TeePNG.hpp"
#pragma link "TeePNG"


void __fastcall TForm1::FormCreate(TObject *Sender)
{
  TPNGExportFormat *png = new TPNGExportFormat;
  png->Panel=Chart1;
  png->PixelFormat=pf24bit;
  png->SaveToFile("d:test.png");
  png->Free();
}

Posted: Thu Apr 06, 2006 3:17 pm
by 9345036
Thank you, #pragma link "TeePNG" was the missing link.