can generate the temp png

This commit is contained in:
2024-08-24 15:03:43 +02:00
parent 1605920d65
commit a16d472028
4 changed files with 74 additions and 23 deletions

View File

@@ -82,10 +82,11 @@ class Inkyimage:
@staticmethod
def preview(image):
"""Previews an image on gpicview (only works on Rapsbian with Desktop)."""
path = "~/temp"
path = "/root/repos/Inkycal/temp"
image.save(path + "/temp.png")
os.system("gpicview " + path + "/temp.png")
os.system("rm " + path + "/temp.png")
print(f"previewing image at {path}/temp.png")
# os.system("gpicview " + path + "/temp.png")
# os.system("rm " + path + "/temp.png")
def _image_loaded(self):
"""returns True if image was loaded"""