I'm receiving some raw JPEG data that is sent from a camera through a socket, along with a custom header where it specifies things like width, height, bright, device, colours, etc.

Could someone give me some tips regarding how I should handle this? Thanks in advance.