ArchivedTools/ScanScripts/Windows/magazines/Rarely used scripts/pages/crop.cmd
2023-12-21 02:01:29 +01:00

20 lines
427 B
Batchfile

if not exist cropped mkdir cropped
setlocal enabledelayedexpansion enableextensions
rem start coords
set /a cy=0
set /a cx=0
rem size
set x=4473
set y=6167
for %%i in (*.tif) DO (
rem set /A cy=%cy%-3
rem convert %%i -crop %x%x%y%+%cx%+!cy! +repage -type Grayscale cropped\%%i.png
convert %%i -crop %x%x%y%+%cx%+!cy! +repage cropped\%%i.png
)
endlocal
rem convert *.jpg -crop 1600x2490+213+2450 +repage pages/even/even.jpg