pil jpegimageplugin jpegimagefile to image

Solutions on MaxInterview for pil jpegimageplugin jpegimagefile to image by the best coders in the world

showing results for - "pil jpegimageplugin jpegimagefile to image"
Stefano
26 Nov 2018
1import io
2from PIL import Image
3
4# Encode your PIL Image as a JPEG without writing to disk
5buffer = io.BytesIO()
6YourImage.save(buffer, format='JPEG', quality=75)
7
8# You probably want
9desiredObject = buffer.getbuffer()