title: when convert to base 64, TypeError: 'str' does not support the buffer interface
body: <pre><code>im = Image.open(filePath)                     # load image
  self.msg = str(bytearray(list(im.getdata()))) # convert image data to string
  encodedMsg = base64.b64encode(self.msg)
  </code></pre>
  
  <p>when I was trying to encode the data read from an image to base64, it returns an error:</p>
  
  <pre><code>File "Steganography.py", line 42, in msgToXml
      encodedMsg = base64.b64encode(self.msg)
    File "/opt/python3/current/lib/python3.4/base64.py", line 62, in b64encode
      encoded = binascii.b2a_base64(s)[:-1]
  TypeError: 'str' does not support the buffer interface
  </code></pre>
  
  <p>It works when I'm home using Ubuntu(python 2.7). But it shows error when I use school machine(python3.4). How can I solve this?</p>