mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
Indexed Color documents store RGB pixels, so Color Table found each pixel's index again as the nearest entry, and entries of one colour lost their own pixels (#14342). The document now keeps each pixel's index (Document::color_indices) where it is known: recorded when a palette PNG is opened, by Image > Mode > Indexed Color and by Color Table itself. Color Table uses it while the layer still has exactly the recorded tiles; after any other change it maps by nearest colour as before. A known index past a shrunk table stays black until the table grows back over it. The native format saves the indices only while they hold for the layer as saved, and pairs them with the loaded layer on open.