Help! How to access RGB camera snapshot image buffer or uncompressed image

I need to access the camera image data uncompressed directly, i.e. RGB. I can only access in JPEG format?