diff options
Diffstat (limited to 'bin/svg+pdf+jpg.sh')
-rwxr-xr-x | bin/svg+pdf+jpg.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/svg+pdf+jpg.sh b/bin/svg+pdf+jpg.sh new file mode 100755 index 0000000..9d6edc4 --- /dev/null +++ b/bin/svg+pdf+jpg.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +set -eu + +INFILE=$1 +DIR=$(dirname "$INFILE") +STEM=$(basename "$INFILE" .svg) + +[ -n "$QUARTO_PROJECT_RENDER_ALL" ] || exit + +inkscape --export-type=pdf,png --export-width=1800 "$INFILE" +ffmpeg -hide_banner -loglevel warning -y -i "$DIR/$STEM.png" -update 1 -frames:v 1 "$DIR/$STEM.jpg" +rm "$DIR/$STEM.png" |