dariush-bahrami's picture
Add colortransfer package
57e3eaa
raw
history blame contribute delete
187 Bytes
from io import BytesIO
from PIL import Image
def convert_bytes_to_pil(bytes_string: bytes) -> Image:
buffer = BytesIO(bytes_string)
buffer.seek(0)
return Image.open(buffer)