use a with statement to update image metadata

This commit is contained in:
Stefal 2023-09-17 20:07:14 +02:00
parent b9060bc2ed
commit 4fcb62f893
2 changed files with 10 additions and 15 deletions

View file

@ -37,6 +37,9 @@ class Writer():
self.updated_exif = {}
self.updated_xmp = {}
def __enter__(self):
return self
def __exit__(self, *args):
self.image.close()