vcinema/get_file.py

14 lines
287 B
Python

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")