When parsing this svg to png:
temp.svg:
<?xml version="1.0" encoding="utf-8" ?>
<svg baseProfile="full" height="1000mm" version="1.1" width="1000mm" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs></defs>
<rect fill="#ffffff" height="1000mm" width="1000mm" x="0" y="0" />
with:
import pyvips
image = pyvips.Image.svgload("temp.svg", dpi=25.4)
image.write_to_file("output_test.png")
output_test's dimensions are 353mm x 353mm (and 353px x 353px). (Should be 1000mm x 1000mm and 1000px x 1000px)
also, intrestingly enough - with image = pyvips.Image.svgload("temp.svg", dpi=x) dimensions of the image scale roughly according to x^1.86
When parsing this svg to png:
temp.svg:
with:
output_test's dimensions are 353mm x 353mm (and 353px x 353px). (Should be 1000mm x 1000mm and 1000px x 1000px)
also, intrestingly enough - with
image = pyvips.Image.svgload("temp.svg", dpi=x)dimensions of the image scale roughly according to x^1.86