-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Reduced the size of all screenshots. #343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #343 +/- ##
============================================
- Coverage 58.37% 58.37% -0.01%
+ Complexity 10316 10210 -106
============================================
Files 1170 1159 -11
Lines 74347 74422 +75
Branches 7324 7361 +37
============================================
+ Hits 43399 43442 +43
- Misses 28421 28485 +64
+ Partials 2527 2495 -32
Continue to review full report at Codecov.
|
|
Some of those images have been reduced already in the past. In my tests pngquant will happily compress those again, but that would probably be at 0.75*0.75 quality. |
|
I've updated the PR:
#!/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 |
|
Deleted the wrong branch... |
|
Hi Team, |
|
Thanks for your contribution. I ran the shell commands on current trunk, inspected the changed images and committed them. |
Description
Reduced size of all png screenshots using:
pngquant -f --ext .png --quality 70-95 *.png.Most were only reduced marginally but some were reduced a lot. This should probably be done for each new screenshot to ensure source control and the doc website loads as fast as possible.
Also:
Removed workbench from a few screenshots.
Removed unused screenshots.