Created
January 28, 2026 23:13
-
-
Save jadeallenx/eb5356ef3c7472c4e8ecf797c7ba3d7b to your computer and use it in GitHub Desktop.
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
| $vips_exe_path = "C:\Users\${env:USERNAME}\Downloads\vips\vipsthumbnail.exe" | |
| $output_path = $env:VIPS_OUTPUT_PATH ?? $null | |
| $cli_opts = "--vips-info --linear --kernel=mks2021 --output-profile=srgb --size=752x" | |
| $quality = 60 | |
| $q_str = "[Q=${quality}]" | |
| Get-ChildItem -Filter *.png -Recurse | ForEach-Object { | |
| $fn = $_.BaseName | |
| $op_path = $output_path ?? $_.DirectoryName | |
| $op_str = "--path={0}" -f (Join-Path $op_path "${fn}.avif${q_str}") | |
| $cli = "${vips_exe_path} ${op_str} ${cli_opts}" | |
| Write-Debug "$cli" | |
| Invoke-Command $cli | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment