make some changes

This commit is contained in:
Sarah 2022-09-09 21:42:53 +01:00
parent ed07915a4d
commit 573c1cd990
2 changed files with 5 additions and 4 deletions

View File

@ -11,4 +11,7 @@ image = pyvips.Image.new_from_file(file)
tn = image.thumbnail_image(1000, crop=pyvips.Interesting.ALL) tn = image.thumbnail_image(1000, crop=pyvips.Interesting.ALL)
tn.write_to_file("x.png") img_buffer = tn.write_to_buffer(".png")
with open("b.png", "wb") as f:
f.write(img_buffer)

View File

@ -99,9 +99,7 @@ def draw_map(films_by_country, file_name="vcinema_map.svg"):
tn = image.thumbnail_image(1000, crop=pyvips.Interesting.ALL) tn = image.thumbnail_image(1000, crop=pyvips.Interesting.ALL)
img_buffer = tn.write_to_memory() img = tn.write_to_buffer(".png")
img = img_buffer[:]
os.remove(file_name) os.remove(file_name)