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.grayThen convert the raw data to C with bin2code.py :
./bin2code.py output.grayThe result can then be appended to ImageResource.h
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login