🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5Paper Image conversion

    Cores
    2
    3
    4.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Beetix
      last edited by

      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

      ZontexZ 1 Reply Last reply Reply Quote 0
      • ZontexZ
        Zontex @Beetix
        last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • B
          Beetix
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post