Skip to content

Conversation

@illwieckz
Copy link
Member

On #166 the PNG were optimized to save file space:

But we don't need to embed opaque images as PNG, using JPEG would save more file space!

So images like unvanquished, tyrant and logo are still kept as PNG since have have transparency, but background, header and splash are now JPEG.

The PNG files of them are kept because they are the source, but they aren't embedded.

The size of those PNGs was 480K, converted to JPEG the size is 72K, so this saves 408K.

I compressed this way:

guetzli --quality 90 splash.png splash.jpg

So I used a quality of 90. If it's considered to low, the quality 95 would produce 96K for the three of them. We may also mix, the splash needs to have good enough quality, the others less.

@slipher
Copy link
Contributor

slipher commented Nov 21, 2025

The build is broken due to unwanted submodule changes.

@illwieckz
Copy link
Member Author

The build is broken due to unwanted submodule changes.

Fixed.

@illwieckz
Copy link
Member Author

I applied per-image quality: the splash uses quality 93, the smallest quality retaining the tyrant head scales details, and other images which aren't very detailed use quality 84 (the smallest guetzli can produce).

@illwieckz
Copy link
Member Author

Before:

187867	background.png
71622	header.png
227847	splash.png
487336	total
480K	total

After:

17648	background.jpg
13057	header.jpg
37543	splash.jpg
68248	total
76K	total

@slipher
Copy link
Contributor

slipher commented Nov 24, 2025

LGTM, thanks!

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.

3 participants