Skip to content

Commit 024f89d

Browse files
authored
pre-commit: add oxipng a lossless PNG compression optimizer (#11065)
* pre-commit: add oxipng a lossless PNG compression optimizer "Lossless compression is a data compression technique where the original data can be perfectly reconstructed from the compressed data. In essence, no information is lost during compression and decompression, making it ideal for situations where data integrity is critical" https://en.wikipedia.org/wiki/Lossless_compression https://github.com/oxipng/oxipng https://github.com/oxipng/oxipng?tab=readme-ov-file#git-integration-via-pre-commit Ran pre-commit here locally and it compressed the images on first run. So we have less data for some images with the same quality. Less data means less to download etc and saves bandwidth. * Fix up from code review
1 parent 7ef5db2 commit 024f89d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+7
-0
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ repos:
2525
hooks:
2626
- id: identity
2727
- id: check-hooks-apply
28+
- repo: https://github.com/oxipng/oxipng
29+
rev: v9.1.5
30+
hooks:
31+
- id: oxipng
32+
name: run oxipng
33+
description: optimize PNG images with lossless compression
34+
args: ['-o', '4', '--strip', 'safe', '--alpha']
2835
- repo: https://github.com/gitleaks/gitleaks
2936
rev: v8.27.2
3037
hooks:
-3.47 KB
-3.49 KB

systemvm/agent/images/left.png

-2.64 KB

systemvm/agent/images/right.png

-2.65 KB

systemvm/agent/images/right2.png

-2.66 KB

systemvm/agent/images/winlog.png

-315 Bytes
-94 Bytes
-63 Bytes
-120 Bytes

0 commit comments

Comments
 (0)