So I'm in the process of making a 2x skin for mania! and I was getting pretty bored of scaling everything down.
I became lazy and wrote a batch script (Windows only) that uses ImageMagick to resize and rename a set of @2x images.
You need to have ImageMagick installed and available through the console.
You can get ImageMagick here!
To get the script to run, create a text document in the skin folder, paste the code below into it, and rename it to have a .bat extension.
You will then be able to double-click the .bat to run the script.
It will scale the image down 50%, and output a file without the @2x on the end, so you'll need to make the @2x versions first.
It will only touch files ending in @2x. It will overwrite existing files.
Enjoy!
I became lazy and wrote a batch script (Windows only) that uses ImageMagick to resize and rename a set of @2x images.
You need to have ImageMagick installed and available through the console.
You can get ImageMagick here!
To get the script to run, create a text document in the skin folder, paste the code below into it, and rename it to have a .bat extension.
You will then be able to double-click the .bat to run the script.
PNG Resizing
SETLOCAL EnableDelayedExpansion
for /f %%a IN ('dir /b *@2x.png') do (
set a=%%a
convert "%%a" -resize 50%% "!a:~0,-7!.png"
)
echo Finished!
pause
JPG Resizing
If you do not want the window to stay open once it is complete, remove the last line ("pause") from the script.SETLOCAL EnableDelayedExpansion
for /f %%a IN ('dir /b *@2x.jpg') do (
set a=%%a
convert "%%a" -resize 50%% "!a:~0,-7!.jpg"
)
for /f %%a IN ('dir /b *@2x.jpeg') do (
set a=%%a
convert "%%a" -resize 50%% "!a:~0,-8!.jpeg"
)
echo Finished!
pause
It will scale the image down 50%, and output a file without the @2x on the end, so you'll need to make the @2x versions first.
It will only touch files ending in @2x. It will overwrite existing files.
Enjoy!