mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-26 18:21:44 +00:00
Do not remap indexes between palette entries that are equal (fix #914)
This commit is contained in:
parent
b4ce12beb4
commit
f696d895b4
@ -102,6 +102,14 @@ Remap create_remap_to_change_palette(
|
||||
continue;
|
||||
|
||||
const color_t color = oldPalette->getEntry(i);
|
||||
|
||||
// If in both palettes, it's the same color, we don't need to
|
||||
// remap this entry.
|
||||
if (color == newPalette->getEntry(i)) {
|
||||
remap.map(i, i);
|
||||
continue;
|
||||
}
|
||||
|
||||
int j = newPalette->findExactMatch(
|
||||
rgba_getr(color),
|
||||
rgba_getg(color),
|
||||
|
Loading…
Reference in New Issue
Block a user