Github user ham1 commented on the issue:
https://github.com/apache/jmeter/pull/343
I've updated the PR:
* removed an unused screenshot
* de-duped a screenshot and
* compressed all png images with an individual saving of more than 2048
bytes using the command line and script below.
`find xdocs/ src/ test/ bin/ -iname "*.png" -print0 | xargs -0 -n 1 -P 3
./compare-size.sh `
```bash
#!/bin/bash
set -e
err_report() {
echo "Error on line $1"
rm -v "${2}.new"
}
trap 'err_report ${LINENO} ${1}' ERR
pngquant --quality=70-100 --output "${1}.new" "${1}"
oldSize=$(stat -c%s "${1}")
newSize=$(stat -c%s "${1}.new")
let "diff = ${oldSize} - ${newSize}" || true # if sum is 0
let "threshold = ${newSize} + (1024 * 2)"
if [[ ${oldSize} -ge ${threshold} ]]
then
echo "${1} compressed, saved ${diff}"
mv "${1}.new" "${1}"
else
rm -v "${1}.new"
fi
```
---