Skip to content

Instantly share code, notes, and snippets.

@Jesse-Culver
Created February 10, 2022 07:32
Show Gist options
  • Select an option

  • Save Jesse-Culver/7ab3fdce86be43fb6249e3711121a08f to your computer and use it in GitHub Desktop.

Select an option

Save Jesse-Culver/7ab3fdce86be43fb6249e3711121a08f to your computer and use it in GitHub Desktop.
Batch Watermarking Images using Powershell
$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