Image File Compression #14615

pull Peppernrino wants to merge 1 commits into bitcoin:master from Peppernrino:image-file-compression changing 102 files +0 −0
  1. Peppernrino commented at 3:36 AM on October 31, 2018: none

    Ran a series of lossless compression algorithms on the images to make them smaller. Total reduction of 279,816 bytes.

    As per the PULL_REQUEST_TEMPLATE.md, I am to state why I feel this pull request is important. Bitcoin is a popular cryptocurrency, and every time someone downloads or uploads the source, it costs bandwidth. It is a measure to save disk space and time. :)

    Over 1,000,000 users, it's a savings of ~279GB each way.

  2. Image File Compression
    Ran a series of lossless compression algorithms on the images to make them smaller. Total reduction of 279,816 bytes.
    
    As stated in the PULL_REQUEST_TEMPLATE.md, I am to state why I feel this pull request is important. Bitcoin is a popular cryptocurrency, and every time someone downloads or uploads the source, it costs bandwidth. It is a measure to save disk space and time. :)
    
    Over 1,000,000 users, it's a savings of ~279GB each way.
    5c64df7e48
  3. dongcarl commented at 3:39 AM on October 31, 2018: member

    What compression pipeline did you use? Perhaps this could be contributed as a script for future PRs containing images?

  4. Peppernrino commented at 4:36 AM on October 31, 2018: none

    It varies from image type to image type, but here is an example of what was run on spinner.png:

    • PngOptimizer.exe -file:"spinner.png" Original Size: 16636. Optimized Size: 1774

    • truepng.exe -o4 -tz -md remove all -g0 /i0 /tz /quiet /y /out "spinner.png" "spinner.png" Original Size: 1774. Optimized Size: 1497

    • pngout.exe /q /y /r /d0 /mincodes0 /kacTL,fcTL,fdAT /s0 "spinner.png" "spinner.png" Original Size: 1497. Optimized Size: 1497

    • optipng.exe -zw32k -quiet -o6 -strip all "spinner.png" Original Size: 1497. Optimized Size: 1497

    • leanify.exe -q -i 30 "spinner.png" Original Size: 1497. Optimized Size: 1480

    • pngwolf.exe --out-deflate=zopfli,iter=30 --in="spinner.png" --out="spinner.png" Original Size: 1480. Optimized Size: 1473

    • pngrewrite.exe "spinner.png" "spinner.png" Original Size: 1473. Optimized Size: 1473

    • advpng.exe -z -q -4 -i 30 "spinner.png" Original Size: 1473. Optimized Size: 1473

    • ECT.exe -quiet --allfilters -strip -9 "spinner.png" Original Size: 1473. Optimized Size: 1344

    • pingo.exe -s8 "spinner.png" Original Size: 1344. Optimized Size: 1344

    • deflopt.exe /a /b /s "spinner.png" Original Size: 1344. Optimized Size: 1344

    • defluff.bat "spinner.png" "spinner.png" Original Size: 1344. Optimized Size: 1344

    • deflopt.exe /a /b /s "spinner.png" Original Size: 1344. Optimized Size: 1344

  5. luke-jr commented at 4:38 AM on October 31, 2018: member

    Note that every user needs to download ~200 GB anyway. Saving a few kB isn't a big deal.

    That being said, no objection to using better PNGs. (Personally I would prefer if we can move to SVGs...)

  6. Peppernrino commented at 4:46 AM on October 31, 2018: none

    Make sure to visually confirm the integrity of the files if you do choose to do this. I noticed some images I did earlier with magick.exe (for another program) had some degradation, so I discarded them.

    I'll go through my logs and gather what I ran on all of the file types that were modified. Just wanted to get a sample done quick for you guys. :)

  7. MarcoFalke commented at 9:00 AM on October 31, 2018: member

    Please adjust https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/optimize-pngs.py so that this can be reproduced by reviewers.

  8. laanwj commented at 4:52 PM on October 31, 2018: member

    NACK, IMO

    Thanks for trying to contribute but this doesn't really help

    • it doesn't make the repository smaller (just includes another copy)
    • yes it might make the distribution a bit smaller, buut the blockchain download and storage size being what it is, what gives?
  9. laanwj closed this on Oct 31, 2018

  10. Peppernrino commented at 5:18 PM on October 31, 2018: none

    Well that's upsetting. I figured anything that helped would be accepted.

    Sorry for confusing the repository with the distribution... I'm a self-trained developer, and sometimes the jargon is the only problem with our communication. Kind of like how I have to Google "NACK" now... :D

    I'll go to that bit @MarcoFalke is talking about, and have some discussion there. I'm sure I can be helpful in this area. Ideally, I want people to include the changes themselves... it's not about glory. Good compression appears to be some kind of secret. lol. I actually started doing this after being inspired by an article entitled, "The Website Obesity Crisis".

  11. Peppernrino commented at 1:29 AM on November 3, 2018: none

    Must be nice to have such crazy veto power. 3 people liked it. You didn't.

  12. meshcollider commented at 8:10 AM on November 3, 2018: contributor

    @Peppernrino sorry your PR was closed, and thanks for trying to contribute, but this isn't about "crazy veto power". Note that Luke only said he had no objection, not that he liked it, and we have hundreds of open pull requests to review, so a change which affects 102 different files without clear benefits is quite a burden on reviewers. So a NACK with good reasoning in this case is enough to warrant closure. Perhaps you could take a look at some of the open issues in the repository and find a different way to contribute :)

  13. Peppernrino commented at 5:35 PM on November 3, 2018: none

    The change makes the files smaller. That is the benefit. And no thank you. I'm turned off from contributing now.

  14. Peppernrino commented at 5:40 PM on November 3, 2018: none

    For the record, @dongcarl indicated that he would like the changes included in upcoming releases as part of how things are done here.

    Reiterating that @luke-jr only had no objection is quite seriously some meaningless semantics. The point was that he felt it would be fine to include. Nuff said.

  15. sipa commented at 5:46 PM on November 3, 2018: member

    @Peppernrino I'm very happy that you were interested in contributing, and sad to see you're turned away by the response. But I agree with @laanwj here; there is a possibly endless stream of incremental improvements like this, and we're very starved on reviewer time.

  16. Peppernrino commented at 5:47 PM on November 3, 2018: none

    Seems like everybody has time to comment on this thread. :D

  17. Peppernrino commented at 5:48 PM on November 3, 2018: none

    Jokes aside, I checked out the thingy @MarcoFalke was talking about, and it seems the images might have a sha256 in there after all! :o This pull might actually make things weird because of how convoluted the compression process already is.

    Quite seriously, we didn't even finish the conversation before the pull was closed. That's why I'm upset at all. I can take rejection. lol. Thank god I have some balls. But always take a moment to consider that you might be discouraging some new developer kid when things like this happen. Maybe you forgot how nerve-wracking it is to submit a pull to something as prestigious as Bitcoin (wowee!)? Having your commit frittered away as "insignificant" can be a real kick in the NACKers. Open source, bb.

  18. Mercosity commented at 7:21 PM on November 3, 2018: none

    All contributions to an open source project should be recognized ..

  19. MarcoFalke commented at 10:37 PM on November 4, 2018: member

    I am happy to review this if this runs on linux (see the script above I linked to) and produces a deterministic as well as stable output.

    But a one-off compression that cannot be run on newly added files because it depends on a random collection of tools that only run on Windows is not particularly useful for the general developer.

  20. laanwj commented at 8:28 AM on November 5, 2018: member

    Look, we have almost 600 issues open: https://github.com/bitcoin/bitcoin/issues

    If you truly want to help the project, and have people be appreciative—whether developers or users of the project—pick something that helps end users, that is a serious problem.

    What doesn't help is arguing here about your own hobby horse. Image compression is a serious subject, I would be the last to disagree, but not in the context of bitcoin and digital currency. Don't see this as a personal rejection, in a project like this we just have to prioritize heavily.

    Edit: and I also agree with @MarcoFalke above

  21. promag commented at 12:11 PM on November 5, 2018: member

    Ran a series of lossless compression algorithms on the images to make them smaller. Total reduction of 279,816 bytes.

    Is the total reduction the sum of each image reduction or the reduction of the final distribution archive?

  22. Peppernrino commented at 5:35 AM on November 7, 2018: none

    Total reduction overall.

  23. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me