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

Recompress png assets with oxipng #2743

Closed
wants to merge 1 commit into from
Closed

Conversation

jtuc
Copy link
Contributor

@jtuc jtuc commented Jan 14, 2025

What

Run oxiping against the assets folder to reduce texture filesize

Implementation Details

Oxipng supports a load of complex options for discarding extra data; to be safe, I didn't user any of these and just ran it with default settings (oxipng --recursive src/main/resources).

Outcome

Jar shrinks a tiny bit (14.3MB -> 13.4MB?)

Additional Information

Some textures look a little different in the diff view (e.g. resources/assets/gtceu/textures/block/multiblock/large_turbine/blade_active/1.png, but in-game these look fine - I assume probably related to changing background color of transparent pixels or something?
2025-01-14_13 43 32
We could consider setting up gradle/github actions to run this optimization automatically, but given the small improvement I think just doing a one-off run is enough.

@jtuc jtuc requested a review from a team as a code owner January 14, 2025 13:54
@jtuc
Copy link
Contributor Author

jtuc commented Jan 14, 2025

From the #modern-dev-talks chat, seems like the consensus is we'd prefer to compress images in release builds via machete rather than modifying source files.

@jtuc jtuc closed this Jan 14, 2025
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.

1 participant