M5Paper Image conversion
-
Hi,
I've forked the Factory Test and I'm trying to add new image resources. What source image format and tool (Linux compatible) should I use to generate C arrays like in ImageResource.h?
Thanks
-
@beetix Hi ! feel free to look over our API: epd_canvas
if you want to use data to draw, you need to use this tool to convert image to data. -
Thank you for your reply. Yes, I did stumble upon the bin2code.py script you mention. The issue is that it doesn't convert the image to raw pixel data (usable by
M5EPD_Driver::WriteFullGram4bpp
).After a bit more research, I found a preliminary command using ImageMagik to convert an image to raw pixel data for the M5EPD:
convert input.png -depth 4 -negate output.gray
Then convert the raw data to C with bin2code.py :
./bin2code.py output.gray
The result can then be appended to ImageResource.h