title: Decode image file to extract image header information and modify it (with python)
body: <p>I'm reading an image file of dpx format, and want to extract the "Orientation" in the image section of the header, and also modify it. I have never tried to interpret binary data, so I'm a bit at a loss. I'm trying to use the struct module, but I really don't know how to do it properly. The file header specification is here:</p>
  
  <p><a href="http://www.fileformat.info/format/dpx/egff.htm" rel="nofollow">http://www.fileformat.info/format/dpx/egff.htm</a></p>
  
  <p>Thanks.</p>