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

    M5Paper Image conversion

    Scheduled Pinned Locked Moved Cores
    3 Posts 2 Posters 5.5k Views
    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 Offline
      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 Offline
        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 Offline
          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

          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
          • First post
            Last post