treeform / pixie

Full-featured 2d graphics library for Nim.
MIT License
742 stars 28 forks source link

[Question] Using pixie during compilation phase #543

Closed mantielero closed 1 year ago

mantielero commented 1 year ago

Do you think pixie could be used to read images during the compilation phase?

I was looking into readImage and I was wondering if using staticRead would be sufficient. The idea would be to add a staticReadImage proc using staticRead.

What am I looking for? I am spending some time in this project: lvgl.nim. When dealing with images, it requires converting the images to C arrays. For that, they set this web page. I'd like to avoid that and to create the array directly in Nim during the compilation phase.

guzba commented 1 year ago

Sorry, no Pixie is not intended to be used during the compilation phase and making this work would not be as easy as using staticRead. Especially not for JPEG and PNG. This is not something that will be supported in Pixie, sorry.