This will not show an image but you can embed binary data at compile time with
something like this
import os, macros, base64
macro embed_binary_file(var_name:untyped,filename:string) : typed =
let bin64 = base64.encode(slurp(filename.strVal))
result = newStmtList()
result.add(newLetStmt(var_name,newStrLitNode(bin64)))
embed_binary_file(img,"digits.bmp")
echo("Image Data:" & $img)
- Image variable, how? Fungi
- Re: Image variable, how? mashingan
- Re: Image variable, how? Fungi
- Re: Image variable, how? mashingan
- Re: Image variable, how? Krux02
- Re: Image variable, how? sky_khan
- Re: Image variable, how? Krux02
