Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

im save to a bytes io python

from io import BytesIO
from PIL import Image, ImageDraw

image = Image.new("RGB", (300, 50))
draw = ImageDraw.Draw(image)
draw.text((0, 0), "This text is drawn on image")

byte_io = BytesIO()

image.save(byte_io, 'PNG')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #im #save #bytes #io #python
ADD COMMENT
Topic
Name
4+9 =