Last active
February 25, 2024 16:00
-
-
Save jim60105/b05beaee124d494afb499fb2c0f45490 to your computer and use it in GitHub Desktop.
Convert images between png, jpg, webp and "Perserve PNG Info used by stable-diffusion-webui"
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
Get-ChildItem "./" -Filter *.jpg | | |
Foreach-Object { | |
$outputWebp = "$([System.IO.Path]::GetFileNameWithoutExtension($_)).webp" | |
magick "$($_.FullName)" $outputWebp | |
exiftool -TagsFromFile "$($_.FullName)" "-UserComment<UserComment" -comment= -overwrite_original $outputWebp | |
} |
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
Get-ChildItem "./" -Filter *.png | | |
Foreach-Object { | |
$outputJpg = "$([System.IO.Path]::GetFileNameWithoutExtension($_)).jpg" | |
magick "$($_.FullName)" $outputJpg | |
exiftool -TagsFromFile "$($_.FullName)" "-UserComment<Parameters" -comment= -overwrite_original $outputJpg | |
} |
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
Get-ChildItem "./" -Filter *.png | | |
Foreach-Object { | |
$outputWebp = "$([System.IO.Path]::GetFileNameWithoutExtension($_)).webp" | |
magick "$($_.FullName)" $outputWebp | |
exiftool -TagsFromFile "$($_.FullName)" "-UserComment<Parameters" -comment= -overwrite_original $outputWebp | |
} |
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
Get-ChildItem "./" -Filter *.webp | | |
Foreach-Object { | |
$outputJpg = "$([System.IO.Path]::GetFileNameWithoutExtension($_)).jpg" | |
magick "$($_.FullName)" $outputJpg | |
exiftool -TagsFromFile "$($_.FullName)" "-UserComment<UserComment" -comment= -overwrite_original $outputJpg | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Convert images between png, jpg, webp and "Perserve PNG Info used by stable-diffusion-webui"
Requirement