Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Reduce image file sizes using lossless compression using imgbot#5808

Merged
daxian-dbw merged 2 commits intoPowerShell:masterfrom
bergmeister:imgbot
Jan 9, 2018
Merged

Reduce image file sizes using lossless compression using imgbot#5808
daxian-dbw merged 2 commits intoPowerShell:masterfrom
bergmeister:imgbot

Conversation

@bergmeister
Copy link
Contributor

PR Summary

I installed imgbot in my fork, which

uses ImageMagick to optimize images through the LosslessCompress() routine from the The .NET wrapper Magick.NET. This means that while the file size is going down, the quality and dimensions remain intact.

This PR took the PR made by the bot that optimized all images but then reverted this test image to its original state because a test needs it to be like that.
The total savings for image files are 145 KB:

/docs/cmdlet-example/Images/Step7.png -- 11.40kb -> 5.97kb (47.59%)
/docs/cmdlet-example/Images/Std5.png -- 11.35kb -> 6.19kb (45.46%)
/docs/cmdlet-example/Images/Step6.png -- 12.12kb -> 6.72kb (44.58%)
/.github/Images/GitHub-PR.png -- 13.15kb -> 7.83kb (40.44%)
/docs/cmdlet-example/Images/Step3.png -- 36.28kb -> 26.26kb (27.61%)
/docs/cmdlet-example/Images/Step8.png -- 34.80kb -> 25.98kb (25.34%)
/docs/cmdlet-example/Images/Std61.png -- 73.17kb -> 56.13kb (23.29%)
/docs/cmdlet-example/Images/Std21.png -- 27.55kb -> 21.16kb (23.2%)
/docs/cmdlet-example/Images/Std22.png -- 3.47kb -> 2.72kb (21.73%)
/docs/cmdlet-example/Images/Step2.png -- 37.28kb -> 29.23kb (21.6%)
/docs/cmdlet-example/Images/Std3.png -- 40.09kb -> 31.83kb (20.6%)
/docs/cmdlet-example/Images/Std4.png -- 37.77kb -> 30.29kb (19.8%)
/docs/cmdlet-example/Images/Step4.png -- 30.58kb -> 24.53kb (19.78%)
/docs/cmdlet-example/Images/Std62.png -- 165.09kb -> 132.97kb (19.46%)
/docs/cmdlet-example/Images/Std63.png -- 38.71kb -> 31.98kb (17.39%)
/docs/cmdlet-example/Images/Step5.png -- 49.43kb -> 41.69kb (15.67%)
/assets/macDialog.png -- 21.90kb -> 18.91kb (13.64%)
/docs/cmdlet-example/Images/Step1.png -- 17.67kb -> 16.86kb (4.6%)
/assets/Powershell_256.png -- 9.52kb -> 9.27kb (2.59%)
/docs/testing-guidelines/Images/AppVeyor-Github.png -- 13.58kb -> 13.45kb (1.02%)

PR Checklist

Note: Please mark anything not applicable to this PR NA.

ImgBotApp and others added 2 commits January 6, 2018 18:14
*Total -- 689.60kb -> 544.63kb (21.02%)

/docs/cmdlet-example/Images/Step7.png -- 11.40kb -> 5.97kb (47.59%)
/docs/cmdlet-example/Images/Std5.png -- 11.35kb -> 6.19kb (45.46%)
/docs/cmdlet-example/Images/Step6.png -- 12.12kb -> 6.72kb (44.58%)
/.github/Images/GitHub-PR.png -- 13.15kb -> 7.83kb (40.44%)
/docs/cmdlet-example/Images/Step3.png -- 36.28kb -> 26.26kb (27.61%)
/docs/cmdlet-example/Images/Step8.png -- 34.80kb -> 25.98kb (25.34%)
/docs/cmdlet-example/Images/Std61.png -- 73.17kb -> 56.13kb (23.29%)
/docs/cmdlet-example/Images/Std21.png -- 27.55kb -> 21.16kb (23.2%)
/docs/cmdlet-example/Images/Std22.png -- 3.47kb -> 2.72kb (21.73%)
/docs/cmdlet-example/Images/Step2.png -- 37.28kb -> 29.23kb (21.6%)
/docs/cmdlet-example/Images/Std3.png -- 40.09kb -> 31.83kb (20.6%)
/docs/cmdlet-example/Images/Std4.png -- 37.77kb -> 30.29kb (19.8%)
/docs/cmdlet-example/Images/Step4.png -- 30.58kb -> 24.53kb (19.78%)
/docs/cmdlet-example/Images/Std62.png -- 165.09kb -> 132.97kb (19.46%)
/docs/cmdlet-example/Images/Std63.png -- 38.71kb -> 31.98kb (17.39%)
/docs/cmdlet-example/Images/Step5.png -- 49.43kb -> 41.69kb (15.67%)
/assets/macDialog.png -- 21.90kb -> 18.91kb (13.64%)
/docs/cmdlet-example/Images/Step1.png -- 17.67kb -> 16.86kb (4.6%)
/assets/Powershell_256.png -- 9.52kb -> 9.27kb (2.59%)
/docs/testing-guidelines/Images/AppVeyor-Github.png -- 13.58kb -> 13.45kb (1.02%)
/test/powershell/Modules/Microsoft.PowerShell.Security/TestData/CatalogTestData/TestImage.gif -- 4.68kb -> 4.66kb (0.6%)
@bergmeister
Copy link
Contributor Author

NB. One Travis build had what seems to be a sporadic, fatal failure, but it passed in my fork here

@markekraus
Copy link
Contributor

@bergmeister I have restarted the linux CI.

@markekraus
Copy link
Contributor

hrm.. well it failed again real quickly. and it's failing other places too. oh well. I'll try restarting them again later.

@daxian-dbw daxian-dbw self-assigned this Jan 8, 2018
@daxian-dbw daxian-dbw merged commit d2863fc into PowerShell:master Jan 9, 2018
@dabutvin
Copy link

👍

If you want more PRs from ImgBot and you need to ignore certain images or paths from being optimized you can use the .imgbotconfig file

https://imgbot.net/docs#ignoring-files

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.

6 participants