title: Reading bytes for an image
body: <p>I read 784 bytes (a 28x28 image) from a file: </p>
  
  <pre><code>with open(self.filePath, 'rb') as f:
      aLetter = f.read(784)
      print ('A Letter',aLetter)
      image = Image.frombytes('1',[79,78],aLetter)
  </code></pre>
  
  <p>When I print and throw that 'letter' into text pad, I count 764 bytes, not 784.   but then when I pass letter to pillow in frombytes, I can pass it up to a size <code>[79,78]</code> byte array.</p>
  
  <p>What gives? How many bytes do I have?  How do I get my 784 bytes array to create a 28x28 letter image? and how is Pillow seeing more bytes than are there?   </p>
  
  <p>For those interested the data is from here:
  <a href="http://cis.jhu.edu/~sachin/digit/digit.html" rel="nofollow noreferrer">http://cis.jhu.edu/~sachin/digit/digit.html</a></p>
  
  <p>Which explains:</p>
  
  <blockquote>
    <p>Each training example is of size 28x28 pixels. The pixels are stored as unsigned chars (1 byte) and take values from 0 to 255</p>
  </blockquote>