Adding paletteMap and threshold for BitmapData on HTML5.