title: Get four 16bit numbers from a 64bit hex value
body: <p>I have been through these related questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/74148/how-to-convert-numbers-between-hex-and-decimal-in-c">How to convert numbers between hexadecimal and decimal in C#?</a></li>
  <li><a href="https://stackoverflow.com/questions/487035/how-to-convert-64bit-long-data-type-to-16bit-data-type">How to Convert 64bit Long Data Type to 16bit Data Type</a></li>
  <li><a href="https://stackoverflow.com/questions/3500493/way-to-get-value-of-this-hex-number">Way to get value of this hex number</a></li>
  </ul>
  
  <p>But I did not get an answer probably because I do not understand 64bit or 16bit values. </p>
  
  <p>I had posted a question on Picasa and face detection, to use the face detection that Picasa does to get individual pics from a photo containing many pictures. <a href="https://stackoverflow.com/questions/3872112/automatic-face-detection-using-api">Automatic Face detection using API</a></p>
  
  <p>In <a href="https://stackoverflow.com/questions/3872112/automatic-face-detection-using-api/3891968#3891968">an answer</a> <a href="https://stackoverflow.com/users/5416/joel-martinez">@Joel Martinez</a> linked to an answer on <a href="http://www.google.com/support/forum/p/Picasa/thread?tid=36ae553a7b49088e&amp;hl=en" rel="nofollow noreferrer">picasa help</a> which said:</p>
  
  <blockquote>
    <p>The number encased in rect64() is a 64-bit hexadecimal number.</p>
    
    <ul>
    <li>Break that up into four 16-bit numbers. </li>
    <li>Divide each by the maximum unsigned 16-bit number (65535) and you'll have four 
    numbers between 0 and 1.</li>
    </ul>
  </blockquote>
  
  <p>the full text</p>
  
  <blockquote>
    <p>@oedious wrote:- This is going to be
    somewhat technical, so hang on. * The
    number encased in rect64() is a 64-bit
    hexadecimal number. * Break that up
    into four 16-bit numbers. * Divide
    each by the maximum unsigned 16-bit
    number (65535) and you'll have four
    numbers between 0 and 1. * The four
    numbers remaining give you relative
    coordinates for the face rectangle:
    (left, top, right, bottom). * If you
    want to end up with absolute
    coordinates, multiple the left and
    right by the image width and the top
    and bottom by the image height.</p>
  </blockquote>
  
  <p>A sample picasa.ini file:</p>
  
  <pre><code>[1.jpg]
  backuphash=65527
  faces=rect64(5520c092dfb2f8d),615eec1bb18bdec5;rect64(dcc2ccf1fd63e93e),bc209d92a3388dc3;rect64(52524b7c785e6cf6),242908faa5044cb3
  crop=rect64(0)
  </code></pre>
  
  <p>How do I get the 4 numbers from the 64 bit hex?</p>
  
  <p>I am sorry people, currently I do not understand the answers. I guess I will have to learn some C++ (I am a PHP &amp; Java Web Developer with weakness in Math) before I can jump in and write a something which will cut up an image into multiple images with the help of some co-ordinates. I am looking into <a href="http://www.boltbait.com/pdn/codelab/" rel="nofollow noreferrer">CodeLab</a> and <a href="http://geekswithblogs.net/tmurphy/archive/2007/08/30/Creating-A-Paint.NET-Effect-Plugin.aspx" rel="nofollow noreferrer">creating plugins for Paint.net</a> too</p>