Commit 6948fb0
committed
Fixed color palette dithering to preserve PLTE chunk
Refactored palette creation to use ImageMagick's mpr: (memory program
register) instead of temp files, eliminating file I/O and cleanup issues.
Key fixes:
- Skip png:exclude-chunks for color palettes (was removing PLTE chunk)
- Apply saturation boost BEFORE normalize (order matters)
- Skip strip() for color palettes (was corrupting colormap)
- Enable normalize + saturationBoost by default for color palettes
Also extracted streamToBuffer() and configureOutputFormat() utilities
to reduce duplication across processing functions.1 parent 18f5f37 commit 6948fb0
4 files changed
Lines changed: 685 additions & 209 deletions
File tree
- trmnl-ha/ha-trmnl
- lib
- tests
- helpers
- integration
0 commit comments