libimg: added support for saving 8-bit images in PNG format #599

Merged
Burer merged 1 commits from libimg-png-8-bit into main 2026-09-07 11:14:23 +00:00
Member
Еxample of an 8-bit png image with a palette https://git.kolibrios.org/KolibriOS/kolibrios/src/branch/main/programs/develop/libraries/TinyGL/asm_fork/examples/text_2.png
IgorA added the
Category
Libraries
Lang/FASM
labels 2026-07-27 08:48:58 +00:00
Burer requested changes 2026-08-24 07:57:04 +00:00
Dismissed
Burer left a comment
Owner

🟡 get_pallete_colors derives the palette size by scanning for two adjacent zero dwords. That's fine for libimg-generated bpp8i images (compact palette + zero tail), but a legitimate palette containing two consecutive 0x00000000 entries mid-array would be truncated early, under-counting colormap_entries and corrupting pixels that index past the written palette. Please either document the assumption (palette must end with ≥2 zero entries) or pass the real entry count explicitly if it's known upstream.

🟡 `get_pallete_colors` derives the palette size by scanning for two adjacent zero dwords. That's fine for libimg-generated bpp8i images (compact palette + zero tail), but a legitimate palette containing two consecutive `0x00000000` entries mid-array would be truncated early, under-counting `colormap_entries` and corrupting pixels that index past the written palette. Please either document the assumption (palette must end with ≥2 zero entries) or pass the real entry count explicitly if it's known upstream.
Burer approved these changes 2026-08-24 07:57:14 +00:00
Doczom approved these changes 2026-08-28 16:27:15 +00:00
Burer added 1 commit 2026-09-07 10:38:50 +00:00
libimg: added support for saving 8-bit images in PNG format
Test PR / Build (en_US) (pull_request) Successful in 3m38s
Test PR / Build (es_ES) (pull_request) Successful in 3m15s
Test PR / Build (ru_RU) (pull_request) Successful in 2m34s
bd6ff68016
Burer force-pushed libimg-png-8-bit from 77b3d793ab to bd6ff68016 2026-09-07 10:38:50 +00:00 Compare
CODEOWNERS rules requested review from system 2026-09-07 10:38:51 +00:00
Burer merged commit a3af661ed6 into main 2026-09-07 11:14:23 +00:00
Burer deleted branch libimg-png-8-bit 2026-09-07 11:14:24 +00:00
Sign in to join this conversation.
No Reviewers
KolibriOS/system
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KolibriOS/kolibrios#599