1 Reply Latest reply on Oct 9, 2010 8:55 AM by coolbeans-john

    Indexed Color Palette Bitmap Possible?

    coolbeans-john

      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.