Hi. I am writing a Karaoke CDG player and hit a problem. The the CDG graphic data uses color palettes. The pixel data is an index into a color palette of 16 colors. The player works but some songs use fade type effects and other tricks by changing the color palette quickly over time. The way I have this implemented right now is to maintain a seperate array containing the colors and lookup the color for each pixel and call setPixel in a BitmapData object. It works fast enough during normal playback but it's way too slow to update the palette and call set pixel on the image data. Is there a way to actually use palette based bitmaps or can you think of a faster way of transforming individual colors in an existing bitmap without calling getPixel/setPixel. Thanks.
I managed to find a way to solve my problem using the paletteMap method of the BitmapData class.
BTW not sure if there is a standard area to publish community code but the Karaoke CDG component is available if anyone wants it. The component basically plays and renders Karaoke mp3/cdg files.