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

    drawJpgFile at specific coordinates

    Scheduled Pinned Locked Moved PRODUCTS
    3 Posts 3 Posters 9.5k Views 1 Watching
    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.
    • F Offline
      forjus2000
      last edited by

      for (int x=0; x <160 ; x++){

      M5.Lcd.setCursor (x, 0);
      M5.Lcd.drawJpgFile(SD, "/picture.jpg");

      }

      how can i draw a jpg image at specific location ?

      1 Reply Last reply Reply Quote 0
      • 0x1abin0 Offline
        0x1abin
        last edited by

        M5.Lcd.drawJpgFile(fs::FS &fs, const char *path, uint16_t x, uint16_t y, uint16_t maxWidth, uint16_t maxHeight, uint16_t offX, uint16_t offY, jpeg_div_t scale);

        1 Reply Last reply Reply Quote 1
        • AsmodevA Offline
          Asmodev
          last edited by

          void drawJpgFile(fs::FS &fs, const char *path, uint16_t x = 0,
                           uint16_t y = 0, uint16_t maxWidth = 0,
                           uint16_t maxHeight = 0, uint16_t offX = 0,
                           uint16_t offY = 0, jpeg_div_t scale = JPEG_DIV_NONE);
          
          void drawPngFile(fs::FS &fs, const char *path, uint16_t x = 0,
                           uint16_t y = 0, uint16_t maxWidth = 0,
                           uint16_t maxHeight = 0, uint16_t offX = 0,
                           uint16_t offY = 0, double scale = 1.0,
                           uint8_t alphaThreshold = 127);
          

          As you can see you don't need the extra values because they're automatically SET, even
          M5.Lcd.drawJpgFile(SD, "/wifi.jpg",110,40,100,100,0,0);
          does not work though, Why are the libraries not working properly?

          1 Reply Last reply Reply Quote 1

          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