Compare commits
No commits in common. "ead6655b7b77a1e2975fe3b7de11a3551d1a1720" and "ed07915a4dbc51e0daafd8737641d3a66f210680" have entirely different histories.
ead6655b7b
...
ed07915a4d
14
get_file.py
Normal file
14
get_file.py
Normal file
@ -0,0 +1,14 @@
|
||||
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")
|
@ -99,7 +99,9 @@ def draw_map(films_by_country, file_name="vcinema_map.svg"):
|
||||
|
||||
tn = image.thumbnail_image(1000, crop=pyvips.Interesting.ALL)
|
||||
|
||||
img = tn.write_to_buffer(".png")
|
||||
img_buffer = tn.write_to_memory()
|
||||
|
||||
img = img_buffer[:]
|
||||
|
||||
os.remove(file_name)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user