uncompressing JPEG hex code into 2D array

I am using ttl jpeg camera(link sprite) and it captures the image as a block of compressed hex code... i want to change this hex into 2D array to be further processed.
please help

How big a picture?
640x480, 8-level black & white is 307,200 bytes.
Maybe if you had a Mega with a Rugged Circuit QuadRam (512Kbyte) card you could do something.

i want to change this hex into 2D array to be further processed.

A JPEG file is a linear stream - I don't see how you could represent it as a 2D array.