Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ ruby -e '[10,100,200].each { |x| `inkscape --export-png logo#{x}.png -w #{x} logo.svg` }'
- for x in 10 100 200 ; do inkscape --export-png logo${x}.png -w ${x} logo.svg ; done
- #!/bin/sh
- # Converts the Inkscape icon file ic_launcher_web.svg to the launcher web & app png files.
- PROJECT="My Project Name"
- INPUT="source-assets/ic_launcher_web.svg"
- MAIN="${PROJECT}/src/main/"
- RES="${MAIN}res/"
- DRAWABLE="${RES}/drawable"
- inkscape --shell <<COMMANDS
- --export-png "${MAIN}ic_launcher-web.png" -w 512 "${INPUT}"
- --export-png "${DRAWABLE}-mdpi/ic_launcher.png" -w 48 "${INPUT}"
- --export-png "${DRAWABLE}-hdpi/ic_launcher.png" -w 72 "${INPUT}"
- --export-png "${DRAWABLE}-xhdpi/ic_launcher.png" -w 96 "${INPUT}"
- --export-png "${DRAWABLE}-xxhdpi/ic_launcher.png" -w 144 "${INPUT}"
- quit
- COMMANDS
- brew install imagemagick --with-librsvg
- brew install homebrew/gui/inkscape
- convert -density 1536 -background none -resize 100x100 input.svg output-100.png
- for s in 10 100 200 ; do convert -density 1536 -background none -resize ${s}x${s} input.svg output-${s}.png ; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement