Closed bobwallis closed 14 years ago
This is one of the features we want to implement in the future. Patches welcome ;)
The simplest solution isn't to remove the --force option from optipng command ? I think people don't care to know if the file is bigger than before, they just care if they won a few Kb's
It's slightly more complicated. OptiPNG sets a "compressed" flag regardless of the file being completely compressed or not. So in order to "recompress" (to gain a few extra Kb) we have to use the --force option. Sometimes this works adversely.
The way the patch will have to work is by doing a dry-run first, checking the filesize, and only running it properly if the file is smaller.
Fixed by bistory in version 1.0.5! :D
Trimage's output image overwrites the original one even if the the output image is larger than the original.