Last active
August 29, 2015 14:05
-
-
Save emcrisostomo/607ee2832353d1991c6d to your computer and use it in GitHub Desktop.
Resize the Flags Archive to the Desired Resolution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script resizes all SVG files svg/*.svg to PNG files with the desired | |
# width. This script assumes that the following source and output directories | |
# already exist: | |
# * svg/ | |
# * png/w | |
# for each target width w. | |
# Loop on the list of desired widths. | |
for res in 256 512 | |
do | |
for i in svg/*.svg | |
do | |
IMAGE_NAME=$(basename $i .svg) | |
rsvg-convert -w ${res} $i -o png/${res}/${IMAGE_NAME}.png | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment