drawJpgFile at specific coordinates



  • 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 ?



  • 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);



  • 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?