JPG read and write

My RMC3720 is connected to a touch screen display through a serial connection (115200 bps).

I’d like to upload images during runtime to the display, and in order to do tha I have to send the pixel information (800x600 image x 65K colors) using this format: x,y,color.

I can download a JPG file to the flash ram through FTP.

Has anyone a library or some idea how could I read the file and handle the data so I get each pixel information?

Thanks in advance.