-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
Patch round path's values + perceptualdiff 27 icons #648
Patch round path's values + perceptualdiff 27 icons #648
Conversation
3l3gant-cod3s
commented
Apr 18, 2022
•
edited
edited
- extract paths' data: xmlstarlet sel -t -m '//@d' -o '"' -v '.' -o '"' -n $f (xidel, xmllint --xpath […] could the job too)
- rounds path's values: svg_path_transform --ndig 0 <<< "path-data" (pip install svg-path-transform)
- search-replace old paths with new paths with sed, xmlstarlet ed […]
- compact paths: scour --indent=none --no-line-breaks --strip-xml-space --enable-id-stripping --strip-xml-prolog --enable-comment-stripping --remove-descriptive-elements "$new" -o "$new_optimised"
- remove newlines except in header: sed / geany (editor)
- compare sizes of old and new SVGs: wc -c
- keep better ones ;o)
- export to old and new SVGs to PNGs: for f in *.svg; do inkscape
$f -b "#ffffff" -z -C -w 512 -h 512 -o png/$ {f/.svg/}.png; done - compare “visually”: perceptualdiff --threshold 266 $old $new_optimised (266 = 1 ‰ of 512×512 pixels)
- manually inspect files over the threshold and keep them if the difference is less than 1 pixel wide i. ex. 1 pixel offset of whole icon.
replace the yellow path by a circle reuse chromium’s icon shorter paths
a few bytes less
a few less bytes for Chrome Icon
a few bytes less (bis)
Update README.md – Chromium
…or-patch shorten colors #xxyyzz -> #xyz
optimisation: 3 black paths -> 1 path
foobar2000 926 -> 785 bytes
…-chrome Revert "a few bytes less"
…mium Revert "a few bytes less (bis)"
…mium Revert "Update README.md – Chromium"
…-3to1 Revert "foobar2000 926 -> 785 bytes"
…-3to1 Revert "optimisation: 3 black paths -> 1 path"
…-chrome-2 Revert "a few less bytes for Chrome Icon"
…ar2000-color-patch Revert "shorten colors #xxyyzz -> #xyz"
I noticed this doesn't update the README with the new sizes? |
@Eiim – in the [ Files changed (28) ] Tab above, I load* a (large) diff of the Readme.md with the 27 new sizes… ???
|
Huh, I missed that, nevermind |
LGTM. Looks like there are a few conflicts to resolve. My fault for not keeping up to date with the repo. Would you mind fixing and I'll merge. Ta! |
I resolved the conflicts and merged. I noticed some of the SVG conflicts weren't reflected in the README conflicts, so I'm curious if there might be some out-of-date sizes in the README. Might be worth running a script to check them. |