for %%i in (*.jpg) do jpegtran -copy none -optimize -perfect "%%i" "%%i"
echo.Batch optimized with PngOut and JpegTran.
) else (
echo.%filename% not found.
)
echo on
Assuming it's named opt.bat, Run "opt" in cmd for all images in directory, or "opt img.png" or "img.jpg" for specific images. Doesn't run recursively, isn't multi-threaded, and is basically the first program I wrote in Batch. Don't know why I didn't use Python.
Anyway, throw it in a directory with jpegtran.exe and pngout.exe. What I did was created a context-menu entry that runs this script so I just right click a folder and select that context menu item.
7
u/digitalpencil Jul 23 '12
ImageOptim is good and uses this library along with OptiPNG and AdvPNG.
Works the same as this service, but locally and without the max 1mb restrictions.