Author Topic: bgrabitmap library size  (Read 2507 times)

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 839
bgrabitmap library size
« on: May 16, 2013, 04:47:35 am »
i have a question about bgrabitmap library size.

i have a simple project with a form and a standard button.

compiled under Win7 Lazarus 1.0.6 32 bits with options smartlink optimized 3 no debug information
the size of executable is 1475 kb
i replace the standard button with a BCButton from BCcontrols package ( 2.2 bgrabitmap 7.2). The size of the executable grows to 2524 kb ( diff <> 1Mb ). Is it normal ?

Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko


  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: bgrabitmap library size
« Reply #1 on: May 16, 2013, 07:38:33 am »
Could be. Have you tried stripping the resulting executable or calling -Xs?

Apart from anything else, I'm guessing there's probably quite some graphics resources in that library, which would increase the first time you use it.

More info:
Want quicker answers to your questions? Read

Open source including papertiger OCR/PDF scanning:

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified


  • Hero Member
  • *****
  • Posts: 3509
    • Personal webpage
Re: bgrabitmap library size
« Reply #2 on: May 18, 2013, 05:25:12 pm »
Yes BGRABitmap is quite big. It is designed so that it is easy to use, you don't need to add many uses clauses. This has a drawback, that some things a linked into the executable even if it is not used. Anyway, if you do some simple things, rapidly you will need those units anyway. Some additional units are not automatically include, and are available for more advanced users. I tried to find a compromise.
Conscience is the debugger of the mind


TinyPortal © 2005-2018