Created
June 1, 2022 21:10
-
-
Save Adophilus/60224ec0d2b7ac98eca7c1be8eab6902 to your computer and use it in GitHub Desktop.
batch script to flip all images in a folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableDelayedExpansion | |
mkdir split | |
mkdir flip | |
mkdir join | |
for %%h in ("*.png") do ( | |
magick convert -crop "200x200" "%%h" "split\%%h" | |
cd split | |
for %%f in ("*.png") do ( | |
ffmpeg -i "%%f" -vf hflip -c:a copy "..\flip\%%f" | |
) | |
cd .. | |
magick convert +append "flip\*" "join\%%h" | |
del /f /q "flip\*" | |
del /f /q "split\*" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment