![]() My script was better: it produced 54% smaller JPG out of the original JPG. ![]() I tested the programs you linked on one JPG. In other words, I don't care what you do with them, but if you find them useful, please share or build upon them (example: making the scripts utilize all cores of multicore CPUs would be nice).Īlso note that if mozjpeg is used on PNG files that are transparent (have alpha channels), these transparent areas will be removed. These are the first bash scripts I've ever written, so they may contain n00b errors - please test them before really using them.īTW, I release these scripts to public domain ( ). These scripts can handle newlines, horizontal tabs and many other special characters in file/folder names. ![]() I tested these scripts on Debian 10 with mozjpeg v 4.0.4. Using this script instead of "mozjpeg-optimizer-v1.sh" is pretty pointless (and slower) since both find the best parameters most of the time. It only simulates compression, but doesn't create any actual compressed JPG files. The script prompts you with an option to overwrite or preserve the original files.Ģnd script, "mozjpeg-extreme-simulation-v1.sh", goes through 243 sets of parameters (almost all possible parameter combinations that are available - beware, it is very slow!) and outputs the results to log files in alphabetical and numerical order. PNG optimization leads to JPG files that are oftem 2-10% of the original PNG in size.ġst script, "mozjpeg-optimizer-v1.sh", goes through 21 sets of mozjpeg parameters that I've found to produce best results (tested on about 500 JPG & PNG files), finds the one that produces the smallest file and uses it to create optimized JPG. JPG optimization with these scripts leads to JPG files that are often 20-70% of the original JPG in size. I wrote these scripts because default mozjpeg settings don't produce the best possible results and it also doesn't work recursively. The scripts should work on various Debian and Ubuntu distros. subfolders included) optimize/compress JPG and PNG files to smaller JPG files without significant loss in image quality. I wrote two bash scripts (see comments section) that use mozjpeg ( ) to recursively (i.e.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |