projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Layered split file for FREQUENCIES works.
[pspp]
/
build-aux
/
svg2png
diff --git
a/build-aux/svg2png
b/build-aux/svg2png
index d00e10952135c44bc158588e6a446da3da172c95..3ba9d6ac9ee0fb82291795e4005d2298ebe23853 100755
(executable)
--- a/
build-aux/svg2png
+++ b/
build-aux/svg2png
@@
-14,19
+14,9
@@
stripprefix=${3#src*icons\/}
width=${stripprefix%%x*}
stripprefix=${3#src*icons\/}
width=${stripprefix%%x*}
-# If no width can be extracted from the destination path
-# then take the natural width by setting width to 0
-case "$width" in
- [0-9][0-9]|[0-9][0-9][0-9]) ;;
- *) width="0";;
-esac
-
-echo "Converting" $1 "to" $3 "size" $width"x"$width
-
comment=`cat $2`
comment=`cat $2`
-gimp -i -b "\
-(let* ((image (car (file-svg-load 1 \"$1\" \"$1\" 90 $width $width 0 ))))
- (gimp-image-attach-parasite image '(\"gimp-comment\" 0 \"$comment\"))
- (gimp-file-save 1 image (car (gimp-image-get-active-drawable image))
- \"$3\" \"$3\"))
- (gimp-quit 1)"
+case $width in
+ [0-9][0-9] | [0-9][0-9][0-9]) widthoption="--width=$width --height=$width" ;;
+ *) widthoption= ;;
+esac
+rsvg-convert $widthoption "$1" | ${PYTHON3:-python3} build-aux/png-add-comment Comment "$comment" > "$3"