Last active
July 31, 2019 04:38
-
-
Save wadadanet/c98a89a8b302592fc89b16fa0ba1cbfb to your computer and use it in GitHub Desktop.
jpg画像を一括mozjpeg圧縮(Windows)
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
@echo off | |
set /P QUALITY="quality(90):" || SET QUALITY=90 | |
cd /d "%~dp0" | |
if "%~1" == "" goto error | |
mkdir "%~dp1mozjpeg\" | |
:loop | |
if not "%~nx1"=="" ( | |
echo ---- %~nx1 mozjpeg... | |
echo "cjpeg.exe -optimize -quality %QUALITY% -outfile %~dp1mozjpeg\%~nx1 %~dp1%~nx1" | |
cjpeg.exe -optimize -quality "%QUALITY%" -outfile "%~dp1mozjpeg\%~nx1" "%~dp1%~nx1" | |
shift | |
goto loop | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment