Compare commits
2 Commits
ed07915a4d
...
ead6655b7b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ead6655b7b | ||
![]() |
573c1cd990 |
14
get_file.py
14
get_file.py
@ -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")
|
|
@ -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…
x
Reference in New Issue
Block a user