@echo off Title convert_syslinux_rev2.bat REM updated 10.24.2014 REM Place this batch file anywhere and drag and drop the image files (bmp, REM jpg or png) to be converted on it (other image formats may not convert REM correctly). Converted files will be moved to the same directory as this file. REM Drag and drop single or multiple 640x480 (or with the same aspect ratio) REM .png or .bmp images into this batch file to convert them to Syslinux REM compatible splash images with ImageMagick. The converted file(s) will REM have "_splash" appended after the name and the extension(s) changed to png. REM This script works for files only (it will not work for folders). Tested on REM Vista and WinXP with ImageMagick portable installed to C:\Utilities folder. REM CD "%~dp0" changes the working directory to the current directory REM (where this batch file is located) REM "%~n1" is the filename minus the extension CD "%~dp0" set cdir=%~dp0% echo. echo Current directory is: "%~dp0" echo. :Loop IF [%1]==[] goto continue F:\Utilities\ImageMagick\convert -resize 640x480 -colors 14 -depth 16 %1 ^ "%~n1_splash.png" move "%~n1_splash.png" "%cdir%" echo "%~nx1 converted to png" echo "converted image moved to:" echo "%cdir%" echo. SHIFT goto Loop :continue echo. echo "All conversions completed...." echo. @pause REM --------------------------- exit ----------------------------------------- :end EXIT /B 0