You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Metadata added by jpeg-recompress can outweight the savings from recompression of small files. The logic for output size calculation and checking ignores size of all metadata and this can result in creating output files larger then original files in some cases.
Example file included:
Command used: jpeg-recompress -l 10 -c -a -q high m.jpg m-out.jpg
I'm also including diff file with my fix. jpeg-recompress.c.diff.txt
The fix also uses minDelta constant which is the minimum required savings in bytes for the new file to be created. I wanted to avoid useless recompressions with 1 byte improvement. This might be improved to be configurable via parameter.
The text was updated successfully, but these errors were encountered:
Metadata added by jpeg-recompress can outweight the savings from recompression of small files. The logic for output size calculation and checking ignores size of all metadata and this can result in creating output files larger then original files in some cases.
Example file included:
Command used:
jpeg-recompress -l 10 -c -a -q high m.jpg m-out.jpg
I'm also including diff file with my fix.
jpeg-recompress.c.diff.txt
The fix also uses minDelta constant which is the minimum required savings in bytes for the new file to be created. I wanted to avoid useless recompressions with 1 byte improvement. This might be improved to be configurable via parameter.
The text was updated successfully, but these errors were encountered: