This is just my own project files for easy building ofjpegoptim withmozjpegand Microsoft Visual Studio. Currently only 64-bit (x64) is targeted.
- Multithreaded; no need for the MSVC Runtime to be installed separately
- Built withLTCG
- Runs on Windows Vista and newer
-
Clone the repository
git clone --recursive https://github /XhmikosR/jpegoptim-windows.git
Alternatively you can do this:
git submodule init git submodule update --recursive
-
Download and installVisual Studio 2022(any edition)
-
Downloadnasmand place
nasm.exe
somewhere into yourPATH
-
Open
jpegoptim.sln
and build, or runbuild.bat
WARNING:The following scripts optimize the images in place! Remember to make a backup before running them.
Here's a sample script that loops through only the first-level subfolders in a folder optimizing all pictures:
for/f"tokens=*"%%iin('dir /a:d /b')do(
jpegoptim.exe --preserve --strip-all --totals --verbose"%%i\*.jpg"
)
Here's another sample script that loops through all subfolders in a folder optimizing all pictures:
for/f"delims="%%iin('dir /b /s *.jpg')do(
jpegoptim.exe --preserve --strip-all --verbose"%%i"
)