Created
December 5, 2022 08:43
-
-
Save hbulens/9bc6246e146e226922e0723a18e2935f to your computer and use it in GitHub Desktop.
Recursive compress images using imagemagick
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
param( | |
[Parameter(Mandatory=$true)] | |
[String]$path | |
) | |
Get-ChildItem –Path $path –Recurse -Include *.png,*.jpg,*.bmp | Foreach-Object { | |
magick $_.FullName -strip -interlace Plane -gaussian-blur 0.05 -quality 85% $_.FullName | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment