Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

README.md

jpegoptim for Windows

Build status

This is just my own project files for easy building of jpegoptim with mozjpeg and Microsoft Visual Studio. Currently only 64-bit (x64) is targeted.

Notes

  • Multithreaded; no need for the MSVC Runtime to be installed separately
  • Built with LTCG
  • Runs on Windows Vista and newer

Build Instructions

  1. Clone the repository
git clone --recursive https://github.com/XhmikosR/jpegoptim-windows.git

Alternatively you can do this:

git submodule init
git submodule update --recursive
  1. Download and install Visual Studio 2019 (any edition)
  2. Download nasm and place nasm.exe somewhere into your PATH
  3. Open jpegoptim.sln and build, or run build.bat

Sample scripts

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=*" %%i in ('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=" %%i in ('dir /b /s *.jpg') do (
  jpegoptim.exe --preserve --strip-all --verbose "%%i"
)
You can’t perform that action at this time.