made img_idx uint16

also added it to CAMERA_EVENT, and minor tidy