Created
February 10, 2022 07:32
-
-
Save Jesse-Culver/7ab3fdce86be43fb6249e3711121a08f to your computer and use it in GitHub Desktop.
Batch Watermarking Images using Powershell
This file contains hidden or 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
| $watermark = "F:\filepath\watermark.png" | |
| # This assumes composite.exe is part of PATH | |
| $magick = "composite.exe -dissolve 15 -tile" | |
| Get-ChildItem -Path 'F:\FilePath\*.png' -Recurse -Force | | |
| Foreach-Object { | |
| $image = $_.FullName | |
| $cmdline = $magick + " `"" + $watermark + "`"" + " `"" + $_.FullName + "`"" + " `"" + $_.FullName + "`"" | |
| Invoke-Expression -Command $cmdline | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment