Created
January 29, 2025 13:58
-
-
Save pleabargain/c3018173d740421b0e906db8aa0c939e to your computer and use it in GitHub Desktop.
powershell using magick to zoom in and crop a photo to 2:3 ratio
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
Get-ChildItem -Path . -File | Where-Object { $_.Name -notmatch '\s' } | ForEach-Object { | |
$output = Join-Path $_.DirectoryName ($_.BaseName + "_cropped" + $_.Extension) | |
magick $_.FullName -gravity center -resize 130% -crop 2:3 +repage $output | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment