Skip to content
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

Merged
merged 33 commits into from
Apr 24, 2022
Merged

Patch round path's values + perceptualdiff 27 icons #648

merged 33 commits into from
Apr 24, 2022

Conversation

3l3gant-cod3s
Copy link
Collaborator

@3l3gant-cod3s 3l3gant-cod3s commented Apr 18, 2022

  1. extract paths' data: xmlstarlet sel -t -m '//@d' -o '"' -v '.' -o '"' -n $f (xidel, xmllint --xpath […] could the job too)
  2. rounds path's values: svg_path_transform --ndig 0 <<< "path-data" (pip install svg-path-transform)
  3. search-replace old paths with new paths with sed, xmlstarlet ed […]
  4. 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"
  5. remove newlines except in header: sed / geany (editor)
  6. compare sizes of old and new SVGs: wc -c
  7. keep better ones ;o)
  8. 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
  9. compare “visually”: perceptualdiff --threshold 266 $old $new_optimised (266 = 1 ‰ of 512×512 pixels)
  10. 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
…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"
@Eiim
Copy link
Collaborator

Eiim commented Apr 20, 2022

I noticed this doesn't update the README with the new sizes?

@3l3gant-cod3s 3l3gant-cod3s changed the title Patch round path's values + perceptualdiff 25 icons Patch round path's values + perceptualdiff 27 icons Apr 20, 2022
@3l3gant-cod3s
Copy link
Collaborator Author

@Eiim – in the [ Files changed (28) ] Tab above, I load* a (large) diff of the Readme.md with the 27 new sizes… ???

  • cf Load diff / Large diffs are not rendered by default

@Eiim
Copy link
Collaborator

Eiim commented Apr 21, 2022

Huh, I missed that, nevermind

@edent
Copy link
Owner

edent commented Apr 24, 2022

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!

@Eiim Eiim merged commit 12da895 into edent:master Apr 24, 2022
@Eiim
Copy link
Collaborator

Eiim commented Apr 24, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants