Skip to content

Instantly share code, notes, and snippets.

View paulbrodersen's full-sized avatar

Paul Brodersen paulbrodersen

View GitHub Profile
@paulbrodersen
paulbrodersen / svg2tiff
Created January 15, 2024 11:43 — forked from matsen/svg2tiff
A script to convert SVG to a TIFF acceptable to PLOS
#!/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