Skip to content

Instantly share code, notes, and snippets.

@olivierperez
Last active February 9, 2016 20:22
Show Gist options
  • Save olivierperez/b1b3dfbc46a59946b841 to your computer and use it in GitHub Desktop.
Save olivierperez/b1b3dfbc46a59946b841 to your computer and use it in GitHub Desktop.
@echo off
set INKSCAPE_EXE="C:\Inkscape\inkscape.exe"
IF NOT EXIST %INKSCAPE_EXE% (
echo Le fichier %INKSCAPE_EXE% n'existe pas
pause
exit
)
echo
set /p svgFile="Nom du fichier (sans extension) ? "
IF NOT EXIST %svgFile%.svg (
echo Le fichier %svgFile%.svg n'existe pas
pause
exit
)
echo --------------------------------------
echo Generation mdpi (32x32)...
%INKSCAPE_EXE% -f %svgFile%.svg -e %svgFile%_mdpi.png -h 32 -w 32
echo Generation hdpi (48x48)...
%INKSCAPE_EXE% -f %svgFile%.svg -e %svgFile%_hdpi.png -h 48 -w 48
echo Generation xhdpi (64x64)...
%INKSCAPE_EXE% -f %svgFile%.svg -e %svgFile%_xhdpi.png -h 64 -w 64
echo Generation xxhdpi (96x96)...
%INKSCAPE_EXE% -f %svgFile%.svg -e %svgFile%_xxhdpi.png -h 96 -w 96
echo --------------------------------------
echo Generation finie
echo --------------------------------------
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment