Show my picture from sd card on ili9341 throw Arduino mega

hello everyone, I want to read my picture from sd card then show on ili9341 LCD ,I try many way but unfortunately any one don't work. i can see test on LCD it's work fine and touch work too.
is there any sample for my issue?

And what format is your picture in?

Please post a link to the actual ILI9341 display that you have bought. e.g. Ebay sale page.

Then we can advise you for suitable library and example code.

David.

my display like this post and use it.ili9341-tft-lcd-sd-and-arduino-mega
first part work fine and show demo but second part that show pic from SD card doesn't work.

it doesn't matter for me ,I want to use any format like .bpm or .jpg . I just want to it work

That particular tutorial is crap.

The ILI9341 display controller requires 3.3V logic. You need to provide level shifters on your 5V MEGA2560. It simply will not work.

David.

Is there a suitable library for this ?

I have an ILI9341 running on a DUE. The DUE is receiving pictures\files from either an OV2640 mini running Arducam or an ESP32CAM. The received file is saved to SD.

Would be kinda useful to see a preview or something of the images.

The SPI ILI9341 display should work fine with ILI9341_due or Adafruit_ILI9341 libraries.

ILI9341_due has an example sdFatTftBitmap.ino

There are many libraries and many examples for .BMP format
And a few for .JPG format

David.

Found some for .JPG, but mostly for the parallel interface TFTs, all I have is SPI based ones.

There is support in the JPEGdecoder library for SPI based displays, but it appears to be only for ESP processors.

Go on. Which format do you want to display? .BMP or .JPG ?

.BMP requires few resources e.g. a Uno is ok.
.JPG requires > 3kB of SRAM. e.g. Due is fine. (and lots of other Arduinos)

There is nothing special about ESP32. It is just a fast MCU with a lot of Flash and SRAM.

David.

JPG, as that is the fastest to transfer. The images come over the air via LoRa.

And I say DUE since I have a plug in shield for it;