[fpc-pascal] Bitmap-as-const-and-write-to-file-thingy

Bo Berglund bo.berglund at gmail.com
Thu Sep 20 23:45:31 CEST 2018

On Wed, 19 Sep 2018 23:58:36 +0200, Marc Santhoff
<M.Santhoff at web.de> wrote:

>Any pointers or hints, please?

You can convert any file you like to an inc file with pascal syntax:

data2inc -A -B laz/images/ide_icon48x48.png datatest.inc icon48x48

This will produce a datatest.inc file ready to be included in your
project and with content looking like this:

const icon48x48 : array[0..4236] of byte=(

data2inc is installed with fpc/lazarus ready for use.
I used a png file shipped with lazarus as the example above.

Bo Berglund
Developer in Sweden

More information about the fpc-pascal mailing list