Skip to content

Instantly share code, notes, and snippets.

@nidbCN
Created September 26, 2024 11:39
Show Gist options
  • Select an option

  • Save nidbCN/642ac025fead89a8952bee21cfcae40f to your computer and use it in GitHub Desktop.

Select an option

Save nidbCN/642ac025fead89a8952bee21cfcae40f to your computer and use it in GitHub Desktop.
Media Scripts
$ext = ".jpg"
foreach ($img in Get-Item "*$($ext)") {
$jxlName = $img.Name.Replace($img.Extension, ".jxl")
Write-Host "converting $($img.Name) to JPEG-XL."
magick $img.Name -define jxl:effort=7 -define jxl:distance=0 -quality 100 "$($jxlName)"
magick identify "$($jxlName)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment