Implementing a native version of flash.display.BitmapData.paletteMap.