Added ability to decode JPEGs from memory.