Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reduce install size by compressing images #1806

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

Raindrac
Copy link
Collaborator

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.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Oct 19, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 19, 2024
@castrojo castrojo added this pull request to the merge queue Oct 19, 2024
Merged via the queue into ublue-os:main with commit 3f7e580 Oct 19, 2024
52 checks passed
@Raindrac Raindrac deleted the compression branch October 19, 2024 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants