chibi-scheme icon indicating copy to clipboard operation
chibi-scheme copied to clipboard

Embedding image files

Open leahneukirchen opened this issue 2 years ago • 1 comments

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?

leahneukirchen avatar Apr 16 '22 15:04 leahneukirchen

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.

ashinn avatar Apr 16 '22 22:04 ashinn