Converting a 64x64 six color image to RGB codes

Hey guys, I'm trying to print out a 64x64 rendition of the ancient monster Medusa on 8 16x32 RGB LED panels. The panels are aligned in two columns, four rows. I've got four panels per column which makes the four rows and that whole combination gives me the 64x64.

On this, I want to print out this image . As this image is very simple, is there any way I can write some algorithm (doesn't have to be in Arduino C, can be in any language) which will go through and convert each of the six colors on there into a cooresponding RGB code that that LED must light up for?

Thanks for your help!

Not too sure what you mean because an image is already in RGB colours.
Unless of course the image is compressed like a jpeg.
If it is a jped then the arduino has not enough memory to decode it.
If it is something like a bmp image then just extract the bytes and send them to the proportional control you have on your display.
I am assuming that the image is held on an SD card.
Look up the file format for the image format and skip over the header.