mirror of https://github.com/aseprite/aseprite.git
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;
|
continue;
|
||||||
|
|
||||||
const color_t color = oldPalette->getEntry(i);
|
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(
|
int j = newPalette->findExactMatch(
|
||||||
rgba_getr(color),
|
rgba_getr(color),
|
||||||
rgba_getg(color),
|
rgba_getg(color),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue