title: Read binary data from an image and save it with JavaScript
body: <p>I want to read the binary data of an image and then save it again to my local disk with JavaScript. </p>
  
  <p>I wrote a small demo that shows this use-case. To read the file I use <a href="https://developer.mozilla.org/en-US/docs/Web/API/FileReader.readAsBinaryString">readAsBinaryString</a> from the <strong>File Reader API</strong> (HTML5) to get the binary data. </p>
  
  <p>I write the binary string into a textfield from which I then read the data again to write it to a file. If I save the file my images (I tested several JPEGs) are broken so you cannot see anything useful. </p>
  
  <p>Can it be that "readAsBinaryString" makes a conversion which makes the binary data incorrect?</p>
  
  <p>To have a look at my demo application I made a <a href="http://jsfiddle.net/qz498/"><strong>fiddle</strong></a>. The main part starts here:</p>
  
  <pre><code>reader.readAsBinaryString(file);
  </code></pre>