Skip to content

Instantly share code, notes, and snippets.

View Drew3D's full-sized avatar

Drew3D Drew3D

  • Raleigh, NC, USA
View GitHub Profile
@Drew3D
Drew3D / split-midjourney-grids.bat
Created June 14, 2022 13:08
Windows batch File for splitting MidJourney 2x2 .webp grid images into 4 separate PNG files using ffmpeg
for %%f in ("_RAW_GRIDS_WEBP/*.webp") do (
ffmpeg.exe -n -i "_RAW_GRIDS_WEBP/%%f" -vf "crop=iw/2:ih/2:0:0" "_SPLIT_GRIDS\%%~nf-01.png"
ffmpeg.exe -n -i "_RAW_GRIDS_WEBP/%%f" -vf "crop=iw/2:ih/2:iw/2:0" "_SPLIT_GRIDS\%%~nf-02.png"
ffmpeg.exe -n -i "_RAW_GRIDS_WEBP/%%f" -vf "crop=iw/2:ih/2:0:ih/2" "_SPLIT_GRIDS\%%~nf-03.png"
ffmpeg.exe -n -i "_RAW_GRIDS_WEBP/%%f" -vf "crop=iw/2:ih/2:iw/2:ih/2" "_SPLIT_GRIDS\%%~nf-04.png"
)
pause