Skip to content

Instantly share code, notes, and snippets.

@wadadanet
Last active July 31, 2019 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wadadanet/c98a89a8b302592fc89b16fa0ba1cbfb to your computer and use it in GitHub Desktop.
Save wadadanet/c98a89a8b302592fc89b16fa0ba1cbfb to your computer and use it in GitHub Desktop.
jpg画像を一括mozjpeg圧縮(Windows)
@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