ashinn / chibi-scheme

Official chibi-scheme repository
Other
1.22k stars 141 forks source link

Embedding image files #825

Open leahneukirchen opened 2 years ago

leahneukirchen commented 2 years ago

Let's say I want to ship a single binary that contains chibi-scheme and a preloaded image, is this possible already? sexp_load_image seems to require a file, but perhaps a big char[] constant could be used as well?

ashinn commented 2 years ago

It would be pretty easy to factor sexp_load_image into 2 routines, one taking a filename and one taking a stream. Then you could use open_memstream to call it on a char[] constant.