tcc/FlaskAPI/services/image.py

19 lines
430 B
Python
Raw Normal View History

class ImageService:
def __init__(self):
pass
def get_simple_image(self):
2023-09-18 15:24:05 +00:00
with open("./static/small-image.png", "rb") as file:
return file.read()
def get_big_image(self):
2023-09-18 15:24:05 +00:00
with open("./static/big-image.png", "rb") as file:
return file.read()
def save_image(self, img):
2023-09-21 20:57:47 +00:00
with open("image.png", "wb") as file:
file.write(img)
2023-09-24 13:56:01 +00:00
return True