calculate correct density for svg -> pbm convert
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 3 Feb 2012 15:27:29 +0000 (16:27 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 3 Feb 2012 15:27:29 +0000 (16:27 +0100)
svg-render.pl [new file with mode: 0755]

diff --git a/svg-render.pl b/svg-render.pl
new file mode 100755 (executable)
index 0000000..6624066
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+
+# 5166 px = 1000 dpi
+
+my $w = 832;
+
+my $density = $w / 5166 * 1000;
+warn "# density = $density\n";
+
+my $from = shift @ARGV || die "usage: $0 template.svg\n";
+
+system "convert -density $density $from $from.pbm";
+
+