- unsigned char red[256], green[256], blue[256];
- const wxPalette& pal = expected8.GetPalette();
- const int paletteCount = pal.GetColoursCount();
- for (i = 0; i < paletteCount; ++i)
- {
- expected8.GetPalette().GetRGB(i, &red[i], &green[i], &blue[i]);
- }
- wxPalette newPal(paletteCount - 1, red, green, blue);
- expected8.Replace(
- red[paletteCount-1], green[paletteCount-1], blue[paletteCount-1],
- red[paletteCount-2], green[paletteCount-2], blue[paletteCount-2]);