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

Reduced the size of all screenshots. #343

Closed
wants to merge 2 commits into
base: trunk
from

Conversation

Projects
None yet
4 participants
@ham1
Copy link

ham1 commented Nov 26, 2017

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.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Nov 26, 2017

Codecov Report

Merging #343 into trunk will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ Complexity Δ
...pache/jmeter/report/core/SampleMetaDataParser.java 0% <0%> (-100%) 0% <0%> (-2%)
src/core/org/apache/jmeter/gui/util/MenuInfo.java 0% <0%> (-84%) 0% <0%> (-9%)
...pache/jmeter/testbeans/gui/LongPropertyEditor.java 0% <0%> (-77.78%) 0% <0%> (-4%)
...he/jmeter/assertions/gui/AbstractAssertionGui.java 50% <0%> (-50%) 1% <0%> (-1%)
...jmeter/processor/gui/AbstractPostProcessorGui.java 50% <0%> (-50%) 1% <0%> (-1%)
...c/core/org/apache/jmeter/gui/util/MenuFactory.java 0% <0%> (-34.16%) 0% <0%> (-27%)
...rg/apache/jmeter/config/gui/AbstractConfigGui.java 33.33% <0%> (-33.34%) 1% <0%> (-1%)
.../jmeter/processor/gui/AbstractPreProcessorGui.java 33.33% <0%> (-33.34%) 1% <0%> (-1%)
...org/apache/jmeter/timers/gui/AbstractTimerGui.java 33.33% <0%> (-33.34%) 1% <0%> (-1%)
...he/jmeter/visualizers/gui/AbstractListenerGui.java 33.33% <0%> (-33.34%) 1% <0%> (-1%)
... and 214 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33f09a9...92a0e1d. Read the comment docs.

@ham1 ham1 force-pushed the ham1:doc_screenshots branch from 43e81ea to c20118f Nov 27, 2017

@FSchumacher

This comment has been minimized.

Copy link
Contributor

FSchumacher commented Dec 3, 2017

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.

@ham1 ham1 force-pushed the ham1:doc_screenshots branch from c20118f to b9ba0ba Dec 3, 2017

@ham1

This comment has been minimized.

Copy link

ham1 commented Dec 3, 2017

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

#!/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

@ham1 ham1 closed this Dec 3, 2017

@ham1 ham1 deleted the ham1:doc_screenshots branch Dec 3, 2017

@ham1 ham1 restored the ham1:doc_screenshots branch Dec 3, 2017

@ham1

This comment has been minimized.

Copy link

ham1 commented Dec 3, 2017

Deleted the wrong branch...

@ham1 ham1 reopened this Dec 3, 2017

@ham1 ham1 force-pushed the ham1:doc_screenshots branch from 75c23e0 to a6dfcef Dec 3, 2017

@ham1 ham1 force-pushed the ham1:doc_screenshots branch 2 times, most recently from 9890ef1 to 714ec89 Dec 11, 2017

@pmouawad

This comment has been minimized.

Copy link
Contributor

pmouawad commented Dec 20, 2017

Hi Team,
if there are volunteer to merge this one, thanks in advance.
Regards

@ham1 ham1 force-pushed the ham1:doc_screenshots branch from 714ec89 to 994cf22 Dec 23, 2017

@ham1 ham1 force-pushed the ham1:doc_screenshots branch from 994cf22 to 04227fd Dec 31, 2017

@ham1 ham1 force-pushed the ham1:doc_screenshots branch from 04227fd to 92a0e1d Jan 7, 2018

@asfgit asfgit closed this in c4b5895 Jan 19, 2018

@FSchumacher

This comment has been minimized.

Copy link
Contributor

FSchumacher commented Jan 19, 2018

Thanks for your contribution. I ran the shell commands on current trunk, inspected the changed images and committed them.

@ham1 ham1 deleted the ham1:doc_screenshots branch Aug 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment