https://github.com/xhmikosr/jpegoptim-windows
Windows 64-bit jpegoptim builds
https://github.com/xhmikosr/jpegoptim-windows
64-bit 64bit binary compress jpeg jpegoptim jpegoptim-windows jpg lossless lossy ltcg mozjpeg msvc optimize windows x64
Last synced: 6 months ago
JSON representation
Windows 64-bit jpegoptim builds
- Host: GitHub
- URL: https://github.com/xhmikosr/jpegoptim-windows
- Owner: XhmikosR
- Created: 2017-03-19T16:05:44.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2025-03-06T05:59:46.000Z (7 months ago)
- Last Synced: 2025-03-30T02:04:13.686Z (6 months ago)
- Topics: 64-bit, 64bit, binary, compress, jpeg, jpegoptim, jpegoptim-windows, jpg, lossless, lossy, ltcg, mozjpeg, msvc, optimize, windows, x64
- Language: C
- Homepage:
- Size: 46.9 KB
- Stars: 108
- Watchers: 11
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jpegoptim for Windows
[](https://github.com/XhmikosR/jpegoptim-windows/actions/workflows/ci.yml?query=branch%3Amain)
This is just my own project files for easy building of [jpegoptim](https://github.com/tjko/jpegoptim)
with [mozjpeg](https://github.com/mozilla/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](https://learn.microsoft.com/en-us/cpp/build/reference/ltcg-link-time-code-generation?view=msvc-170)
* Runs on Windows Vista and newer## Build Instructions
1. Clone the repository
```shell
git clone --recursive https://github.com/XhmikosR/jpegoptim-windows.git
```Alternatively you can do this:
```shell
git submodule init
git submodule update --recursive
```2. Download and install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) (any edition)
3. Download [nasm](https://www.nasm.us/) and place `nasm.exe` somewhere into your `PATH`
4. 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:
```bat
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:
```bat
for /f "delims=" %%i in ('dir /b /s *.jpg') do (
jpegoptim.exe --preserve --strip-all --verbose "%%i"
)
```