Coding the camera