Skip to content

Instantly share code, notes, and snippets.

@accidentalrebel
Last active October 24, 2016 14:38
Show Gist options
  • Save accidentalrebel/e8335c106ab18111120de07d7490ce81 to your computer and use it in GitHub Desktop.
Save accidentalrebel/e8335c106ab18111120de07d7490ce81 to your computer and use it in GitHub Desktop.
Added a scale functionality to watermark.bat
@echo off
for %%i in (to_convert/*.jpg) do (^
magick convert "to_convert/%%i" -auto-orient "to_convert/%%i"^
&& magick composite -watermark 10 -gravity center watermark-white.png "to_convert/%%i" "watermarked/%%i"^
&& echo "composite of %%i successful"^
&& magick convert -resize 30%% "watermarked/%%i" "watermarked/%%i"^
&& echo "resizing of %%i to 30%% successful"^
&& del "%cd%\to_convert\%%i"^
&& echo "Successfully deleted %cd%\to_convert\%%i" )
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment