More details about the batch file and how it's useful can be found on a page I made here:
https://sites.google.com/view/batchconv ... forvr/home
Posting this here because it's a script I was looking for but could not find, so had to cobble together the right set of ImageMagick commands and some nested FOR loops to make it work, and wanted to give back the results for others like me.
1) Download and install ImageMagick if you haven't already (but you're here, so chances are you have).
2) Copy the following code into a blank text file and save it as something like "2to1.bat" in the same folder with the pictures you'd like to convert
Code: Select all
setlocal enabledelayedexpansion
@echo off
for %%i in (*.JPG) do (
for /f %%a in ('identify -format %%w "%%~i"') do (
set /A width=%%~a /2
echo "%%~i" !width!
convert -monitor "%%~i" -gravity center -background black -extent 0x!width! "converted\%%~i"
)
)
4) Open DOS Command Prompt via WindowsKey+R or search for CMD in the Windows menu.
5) Change directories (CD) until you're in the source images folder.
6) Run 2to1.bat (or whatever you named it).
7) Watch the magic happen!