Compare commits

..

2 Commits

Author SHA1 Message Date
Sarah
ead6655b7b Delete get_file.py 2022-09-09 21:44:10 +01:00
Sarah
573c1cd990 make some changes 2022-09-09 21:42:53 +01:00
2 changed files with 1 additions and 17 deletions

View File

@ -1,14 +0,0 @@
import base64
from svglib.svglib import svg2rlg
from reportlab.graphics import renderPDF, renderPM
import cairosvg
file = "vcinema_map.svg"
import pyvips
image = pyvips.Image.new_from_file(file)
tn = image.thumbnail_image(1000, crop=pyvips.Interesting.ALL)
tn.write_to_file("x.png")

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)
img_buffer = tn.write_to_memory()
img = img_buffer[:]
img = tn.write_to_buffer(".png")
os.remove(file_name)