File size: 267 Bytes
1f074d8
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import os
from PIL import Image
from io import BytesIO

class ImageSaver:
    def __init__(self, image_data):
        self.image_data = image_data

    def save_image(self, file_path):
        image = Image.open(BytesIO(self.image_data))
        image.save(file_path)