Skip to content

Instantly share code, notes, and snippets.

@Anoopi-iSingh
Forked from rintukutum/svg2tiff
Created July 29, 2017 12:12
Show Gist options
  • Select an option

  • Save Anoopi-iSingh/e2891d8ce25337e23a2addf20d22f24c to your computer and use it in GitHub Desktop.

Select an option

Save Anoopi-iSingh/e2891d8ce25337e23a2addf20d22f24c to your computer and use it in GitHub Desktop.

Revisions

  1. @matsen matsen revised this gist Aug 9, 2013. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion svg2tiff
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,6 @@
    # Requires Inkscape and ImageMagick 6.8 (doesn't work with 6.6.9)

    for i in $@; do
    inkscape --without-gui --export-png="$(basename $i .svg).png" $i
    BN=$(basename $i .svg)
    inkscape --without-gui --export-png="$BN.png" --export-dpi 300 $i
    convert -compress LZW -alpha remove $BN.png $BN.tiff
  2. @matsen matsen revised this gist Dec 12, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion svg2tiff
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/bin/sh

    # Convert all arguments (assumed SVG) to a TIFF acceptable to PLOS ONE
    # 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
  3. @matsen matsen created this gist Dec 12, 2012.
    13 changes: 13 additions & 0 deletions svg2tiff
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/bin/sh

    # Convert all arguments (assumed SVG) to a TIFF acceptable to PLOS ONE
    # Requires Inkscape and ImageMagick 6.8 (doesn't work with 6.6.9)

    for i in $@; do
    inkscape --without-gui --export-png="$(basename $i .svg).png" $i
    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