yszhli
Results
1
comments of
yszhli
def process_image(image: dict | Image.Image) -> Image.Image: if isinstance(image, Image.Image): return image.convert("RGB") if "bytes" in image: assert "image" not in image, "Cannot have both `bytes` and `image`" image["image"] = Image.open(BytesIO(image["bytes"]))...