programs/games: Optimize GIFs #235

Merged
ace-dent merged 6 commits from ace-dent/kolibrios-gitea:PR-OptimizeGIFs into main 2025-06-17 23:55:31 +02:00
Member

Lossless optimization of GIF image files.
Processed with gifsicle -O3(extreme) or gifsicle --no-loopcount (when only minimal adjustment is permitted).
LZW stream optimized with flexigif -p -f -a=1. Methods selected to ensure optimal compression with final KPACK step, since better LZW may reduce LZMA used in bundling programs, using: xz --format=lzma --check=none --lzma1=mode=normal,dict=64KiB,nice=273,lc=3,lp=0,pb=2 -k -c in.gif > out.lzma
Tested with GIF Inspector and via code review.

📦 Program graphics (compiled or included with software):

  • Slimmed almaz/aniall.gif, saving 380 bytes, ~9%.
  • Slimmed invaders/ 21 files, saving 1232 bytes, average ~3%.
  • Slimmed megamaze/orientg2.gif, saving 986 bytes, ~31%.
  • Slimmed phenix/objects.gif, saving 24 bytes, ~2%.

🥀 Old vestigial images, no longer used:

  • Deleted almaz/explode1.gif, 4865 bytes.
Lossless optimization of GIF image files. Processed with `gifsicle -O3`(extreme) or `gifsicle --no-loopcount` (when only minimal adjustment is permitted). LZW stream optimized with `flexigif -p -f -a=1`. Methods selected to ensure optimal compression with final KPACK step, since better LZW may reduce LZMA used in bundling programs, using: `xz --format=lzma --check=none --lzma1=mode=normal,dict=64KiB,nice=273,lc=3,lp=0,pb=2 -k -c in.gif > out.lzma` Tested with [GIF Inspector](https://movableink.github.io/gif-inspector/) and via code review. 📦 Program graphics (compiled or included with software): - Slimmed `almaz/aniall.gif`, saving 380 bytes, ~9%. - Slimmed `invaders/` 21 files, saving 1232 bytes, average ~3%. - Slimmed `megamaze/orientg2.gif`, saving 986 bytes, ~31%. - Slimmed `phenix/objects.gif`, saving 24 bytes, ~2%. 🥀 Old vestigial images, no longer used: - Deleted `almaz/explode1.gif`, 4865 bytes.
ace-dent added the
Category/Applications
Kind
Enhancement
Priority
Low
labels 2025-05-14 18:58:24 +02:00
ace-dent added 1 commit 2025-05-14 18:58:28 +02:00
programs/games: Optimize GIFs phenix
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 36s
Build system / Build (pull_request) Successful in 6m33s
8e0a284728
Lossless optimization of GIF image files, with `gifsicle -O3` and `flexigif -p -f -a=1`.
Program graphics (compiled or included with software):
- Slimmed `phenix/objects.gif` from 1052 to 1028 bytes, saving 24 bytes, ~2%.
ace-dent added 1 commit 2025-05-14 20:37:11 +02:00
programs/games: Optimize GIFs almaz
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 26s
Build system / Build (pull_request) Successful in 8m56s
cdadea3fe4
Lossless optimization of GIF image files, with `gifsicle -O3` and `flexigif -p -f -a=1`.

📦 Program graphics (compiled or included with software):
- Slimmed `almaz/aniall.gif` from 4248 to 3066 bytes, saving 1182 bytes, ~4.8%.

🥀 Old vestigial images, no longer used:
- Delete unused asset `explode1.gif`, 4865 bytes.
ace-dent force-pushed PR-OptimizeGIFs from cdadea3fe4 to 1c40140d54 2025-05-14 20:56:36 +02:00 Compare
ace-dent force-pushed PR-OptimizeGIFs from 1c40140d54 to fbb2a84ebe 2025-05-14 21:53:15 +02:00 Compare
ace-dent force-pushed PR-OptimizeGIFs from fbb2a84ebe to 58666917d2 2025-05-15 12:19:03 +02:00 Compare
ace-dent added 1 commit 2025-05-15 12:40:37 +02:00
programs/games: Optimize GIFs invaders
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 28s
Build system / Build (pull_request) Successful in 4m21s
df7c54c3e8
Lossless optimization of GIF image files, with `gifsicle -O3` and `flexigif -p -f -a=1`.

📦 Program graphics (compiled or included with software):
- 21 files, 1232 bytes saved total, average saving ~3%.
ace-dent added 1 commit 2025-05-15 12:59:10 +02:00
programs/games: Optimize GIFs megamaze
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 24s
Build system / Build (pull_request) Successful in 5m39s
f349bb0f69
Lossless optimization of GIF image files, with `gifsicle -O3` and `flexigif -p -f -a=1`.

📦 Program graphics (compiled or included with software):
- Slimmed 'megamaze/orientg2.gif' from 3114 to 2128 bytes, saving 986 bytes, ~31%.
ace-dent force-pushed PR-OptimizeGIFs from f349bb0f69 to cc53152fab 2025-05-15 13:00:51 +02:00 Compare
ace-dent added 2 commits 2025-05-15 15:49:10 +02:00
Lossless optimization of GIF image file, removing excess `NETSCAPE` loop blocks. Could not use `gifsicle` due to program specific  local palettes. Did not apply `flexigif`, as this hinders KPACK LZMA compression.

📦 Program graphics (compiled or included with software):
- Slimmed `almaz/aniall.gif` from 4248 to 3868 bytes, saving 380 bytes, ~9%.
programs/games: Optimize GIFs invaders
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 23s
Build system / Build (pull_request) Successful in 4m17s
1ad3d5b27f
Lossless optimization of GIF image files. Selective use of `gifsicle -O3` and/or `flexigif -p -f -a=1`, ensuring optimal KPACK LZMA compression.

📦 Program graphics (compiled or included with software):
- 21 files, 1232 bytes saved total, average saving ~3%.
ace-dent added the
PR
Review required
label 2025-05-15 15:54:34 +02:00
Author
Member

I've tested and happy with output. Needs to be tested with a full distro (e.g. ISO).
Some files were re-processed (reduced optimization!), to better work with KPACK. I can give more details if required.

These changes save ~1.4 KiB in the final shipped binaries.

I've tested and happy with output. Needs to be tested with a full distro (e.g. ISO). Some files were re-processed (reduced optimization!), to better work with KPACK. I can give more details if required. These changes save ~1.4 KiB in the final shipped binaries.
ace-dent changed title from WIP: programs/games: Optimize GIFs to programs/games: Optimize GIFs 2025-05-15 15:57:33 +02:00
ace-dent requested review from dunkaist 2025-05-18 19:43:59 +02:00
ace-dent requested review from Sweetbread 2025-05-18 19:43:59 +02:00
Sweetbread refused to review 2025-05-19 15:02:35 +02:00
ace-dent requested review from Leency 2025-05-20 23:05:54 +02:00
Owner

All modified games (almaz, inviders, megamaze and phenix) seems to be working okay.
But I am not sure about megamaze, can't understand controls here, and also content seems to be over-floating window size (not related to this PR)

All modified games (`almaz`, `inviders`, `megamaze` and `phenix`) seems to be working okay. But I am not sure about `megamaze`, can't understand controls here, and also content seems to be over-floating window size (not related to this PR)
Burer approved these changes 2025-05-22 13:16:33 +02:00
Author
Member

Thanks @Burer for your time and review.

... I am not sure about megamaze ...

Took me a while too! You need to click on the Game (/maze type) to select different variants. Eventually you will find the graphics for the cars!

Thanks @Burer for your time and review. > ... I am not sure about `megamaze` ... Took me a while too! You need to click on the Game (/maze type) to select different variants. Eventually you will find the graphics for the cars!
Owner

Took me a while too! You need to click on the Game (/maze type) to select different variants. Eventually you will find the graphics for the cars!

Got it, thank you!

Car graphics looks to be okay, even if I didn't manage to understand controls 😂

> Took me a while too! You need to click on the Game (/maze type) to select different variants. Eventually you will find the graphics for the cars! Got it, thank you! Car graphics looks to be okay, even if I didn't manage to understand controls 😂
ace-dent added
PR
Ready to merge
and removed
PR
Review required
labels 2025-05-24 18:03:43 +02:00
ace-dent added
PR
Review required
and removed
PR
Ready to merge
labels 2025-05-27 10:13:07 +02:00
ace-dent requested review from mxlgv 2025-05-27 10:13:18 +02:00
dunkaist approved these changes 2025-06-16 22:35:04 +02:00
ace-dent added
PR
Ready to merge
and removed
PR
Review required
labels 2025-06-17 11:16:17 +02:00
ace-dent force-pushed PR-OptimizeGIFs from 1ad3d5b27f to 1565fb3720 2025-06-17 11:23:30 +02:00 Compare
ace-dent removed review request for Leency 2025-06-17 11:23:50 +02:00
ace-dent removed review request for mxlgv 2025-06-17 11:23:51 +02:00
ace-dent scheduled this pull request to auto merge when all checks succeed 2025-06-17 11:32:21 +02:00
ace-dent scheduled this pull request to auto merge when all checks succeed 2025-06-17 11:56:34 +02:00
ace-dent canceled auto merging this pull request when all checks succeed 2025-06-17 23:05:03 +02:00
ace-dent scheduled this pull request to auto merge when all checks succeed 2025-06-17 23:05:37 +02:00
ace-dent merged commit 4cc716458a into main 2025-06-17 23:55:31 +02:00
ace-dent deleted branch PR-OptimizeGIFs 2025-06-18 00:05:03 +02:00
Sign in to join this conversation.
No Reviewers
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KolibriOS/kolibrios#235
No description provided.