title: converting a PIL image to wxPython bitmap image
body: <p>I can load a JPEG image, convert it to bitmap and plot it in a wx application. I am having however a hard time in converting a PIL image object into a bitmap that can be plotted into a wx application.</p>
  
  <p>Online, the best suggestion I could find is to do something like</p>
  
  <pre><code>wx.Bitmap(PIL_image.tobytes())
  </code></pre>
  
  <p>However, this gives me the following error</p>
  
  <pre><code>UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 59: invalid start byte
  </code></pre>
  
  <p>or </p>
  
  <pre><code>UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 51: invalid continuation byte
  </code></pre>
  
  <p>Has someone a good hint on how to address this point? Thanks!</p>