Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pil.jpegimageplugin.jpegimagefile to image

import io
from PIL import Image

# Encode your PIL Image as a JPEG without writing to disk
buffer = io.BytesIO()
YourImage.save(buffer, format='JPEG', quality=75)

# You probably want
desiredObject = buffer.getbuffer()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #image
ADD COMMENT
Topic
Name
1+7 =