make some changes
This commit is contained in:
parent
ed07915a4d
commit
573c1cd990
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue