title: Convert PIL Image to Bytes, getting Error
body: <p>The solutions I have found said to:</p>
  
  <pre><code>from PIL import Image
  import io
  
  img = "1.jpg"
  image = Image.open(img)
  
  # ... other processing...
  
  buf = io.BytesIO()
  image.save(buf, format="JPEG")
  buf.get_value()
  </code></pre>
  
  <p>But I get the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  AttributeError: '_io.BytesIO' object has no attribute 'get_value'
  </code></pre>
  
  <p>If I try instead:</p>
  
  <pre><code>buf.seek(0)
  </code></pre>
  
  <p>It just outputs 0.</p>
  
  <p>Those are the only two suggestions I have found and they are not working for me. Is it an issue with my versions?
  I have Python 3.7.3 and PIL 6.1.0</p>