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

2018-09-19 Thread Marc Santhoff
Hi,

a program im fiddling with uses exactly 2 small .gif pictures that are to be
stored in the code and written out to the file system.

For several reasons - no gif writer, complicates ressouce file handling,
linking fpimage or similar - I want to handle those files directly in code,
having an array of hex bytes and some code writing those consts to file.

What I need:

- A program taking a binary file and spitting out pascal code for the const
array. I know I have seen such program in the past, but do not know where.

- Some hints on using this constant for making files out of them. Currently
I'm plannig to use a TFileStreaam writing out Bytes, should do.

Any pointers or hints, please?

TIA,
Marc

-- 
Marc Santhoff 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

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

2018-09-19 Thread Tomas Hajny
On Wed, September 19, 2018 23:58, Marc Santhoff wrote:


Hi,

 .
 .
> What I need:
>
> - A program taking a binary file and spitting out pascal code for the
> const array. I know I have seen such program in the past, but do not know
> where.

data2inc is included with FPC.


> - Some hints on using this constant for making files out of them.
> Currently I'm plannig to use a TFileStreaam writing out Bytes, should do.

Indeed, should do; simple file of byte and BlockWrite should do as well.

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal