2023-08-31 18:15:50 +00:00
|
|
|
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()
|
2023-08-31 18:15:50 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|