mirror of
https://github.com/usetrmnl/trmnl-home-assistant.git
synced 2026-04-29 13:44:17 -07:00
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.