M5Stack [Core2] Image using drawJpgFile from SD Card



  • I'm using this code to get an image from the SD card formatted with (exFAT) which is placed in the main directory of the SD card.

    //Code to load the image
    M5.Lcd.drawJpgFile(SD, "/wifi.jpg",110,40);

    However it does not work? The image is 100px,100px, trying to place it at x110, y40 on screen.

    The screen has no image? what's wrong with this? the image is in format .jpg but it just refuses to work?



  • Does the image work if directly uploaded to the core2's memory? If not then you need to format the image in a very specific way using a program like GIMP (which is free).



  • it works when set as c code and implemented in the sketch yeah.



  • JPG has several Cilor Mode.
    Use as JPG RGB MODE
    For example, you can do it with GIMP.