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
# Converts all JPG files in the current directory from the "bw2a" format | |
# (the color on the left half of the image, and a mask for transparency | |
# on the right half) used by NScripter to PNG format with transparency. | |
gci . -Filter "*.jpg" | | |
Foreach-Object { | |
# Split JPG into two halves: | |
# - _temp-0.png is the color half | |
# - _temp-1.png is the mask half | |
magick $_ -crop 50%x100% _temp.png |