ublue-os / bluefin

The next generation Linux workstation, designed for reliability, performance, and sustainability.
https://projectbluefin.io
Apache License 2.0
1.25k stars 162 forks source link

feat: reduce install size by compressing images #1806

Closed Raindrac closed 1 month ago

Raindrac commented 1 month ago

Monthly wallpapers currently range in size from 10 MB to 30 MB. Once we have all 24 monthly wallpapers, they're going to take up around ~480 MB of the installation size. This is large enough that they'll take up around 10% of the installation size of Bluefin. That's hefty!

The file size could be reduced by applying lossy compression.

This commit applies 90% lossy compression to all of the monthly wallpapers. Here's a comparison.

Screenshot from 2024-10-15 22-21-26

Can you spot the difference? The one on the right, which is lossy and included in this commit, has a slightly smoother film grain. And this is with 200% zoom; at 100% zoom, it's practically unnoticeable.

This marginal decrease in quality reduces file size by 85% - 95% and at the moment it already saves 177.6MB. If you ask me, it's definitely worth it! The gains will only continue as we add new wallpapers.

I believe there's merit to uploading the lossless variants somewhere, so I propose creating a new repository to host the lossless wallpapers alongside this commit.

Wallpapers aren't the only images compressed in this commit. Two .svg files had unnecessary metadata removed, marginally reducing their file size. I looked into the compression of other images as well, but they were already small enough that the effort wasn't worth it.