how to read binary after resize image on python?
<p>i use two packages
<code>from PIL import Image</code> and <code>from resizeimage import resizeimage</code> when i use this packages i should after resize save to other image file, but i need image binary after resize not save to other file ?</p>

<p>code :</p>

<pre><code>with open(imgpath, 'r+b') as f:
    with Image.open(f) as image:
        cover = resizeimage.resize_cover(image, [100, 100])
             img =  bytearray(cover.read())
</code></pre>

<p>i need read binary like this : <code>bytearray(cover.read())</code> this code not work,
how to read binary after resize image?</p>