Created
December 12, 2012 01:05
-
-
Save matsen/4263955 to your computer and use it in GitHub Desktop.
A script to convert SVG to a TIFF acceptable to PLOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Convert all arguments (assumed SVG) to a TIFF acceptable to PLOS | |
# Requires Inkscape and ImageMagick 6.8 (doesn't work with 6.6.9) | |
for i in $@; do | |
BN=$(basename $i .svg) | |
inkscape --without-gui --export-png="$BN.png" --export-dpi 300 $i | |
convert -compress LZW -alpha remove $BN.png $BN.tiff | |
mogrify -alpha off $BN.tiff | |
rm $BN.png | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm in 2022 and it still works. Thanks to the creators of these little scripts.