mirror of
https://github.com/owntracks/ios.git
synced 2026-10-23 11:15:54 +02:00
[FIX] dynamic coloring of iBeacon indicators on map [NEW] iBeacon images v2
24 lines
628 B
Bash
Executable File
24 lines
628 B
Bash
Executable File
#!/bin/bash
|
|
|
|
INK=/Applications/Inkscape.app/Contents/Resources/bin/inkscape
|
|
IMAGEW=imagew
|
|
|
|
if [[ -z "$1" ]]
|
|
then
|
|
echo "SVG file needed."
|
|
exit;
|
|
fi
|
|
|
|
BASE=`basename "$1" .svg`
|
|
SVG="$1"
|
|
MYPWD=`pwd`
|
|
|
|
# need to use absolute paths in OSX
|
|
|
|
$INK -z -D -e "$MYPWD/$BASE-40.png" -f $MYPWD/$SVG -w 40 -h 40
|
|
$INK -z -D -e "$MYPWD/$BASE-40@2x.png" -f $MYPWD/$SVG -w 80 -h 80
|
|
$INK -z -D -e "$MYPWD/$BASE-40@3x.png" -f $MYPWD/$SVG -w 120 -h 120
|
|
$IMAGEW "$MYPWD/$BASE-40.png" "$MYPWD/$BASE-40-noalpha.png"
|
|
$IMAGEW "$MYPWD/$BASE-40@2x.png" "$MYPWD/$BASE-40-noalpha@2x.png"
|
|
$IMAGEW "$MYPWD/$BASE-40@3x.png" "$MYPWD/$BASE-40-noalpha@3x.png"
|