Skip to content

Commit 3a643e0

Browse files
committed
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.
1 parent 5b7c3b4 commit 3a643e0

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/shssoichiro/oxipng
29+
rev: v9.1.4
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/pre-commit/pre-commit-hooks
2936
rev: v4.6.0
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)