Created
January 20, 2015 09:47
-
-
Save akof1314/8b350e1b6f321c8e7fba to your computer and use it in GitHub Desktop.
ImageMagick 拆分透明PNG、合并JPG和Alpha Mask
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
@echo off | |
set exevar="D:\Program Files\ImageMagick-6.9.0-Q16\convert.exe" | |
for /f "usebackq tokens=*" %%d in (`dir /s /b *.jpg`) do ( | |
%exevar% "%%d" "%%~dpnd_alpha_mask.png" -compose copyopacity -composite "%%~dpnd_with_alpha.png" | |
) |
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
@echo off | |
set exevar="D:\Program Files\ImageMagick-6.9.0-Q16\convert.exe" | |
for /f "usebackq tokens=*" %%d in (`dir /s /b *.png`) do ( | |
%exevar% "%%d" -background black -alpha remove "%%~dpnd.jpg" | |
%exevar% "%%d" -alpha extract "%%~dpnd_alpha_mask.png" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment