Palette animation

I've got graphics files that I can load but when I draw them its a mess because its two images in one files, palette animation is used to fade from one to the other (this is all done with QuickDraw but for reasons I wont mention I dont want to use QuickDraw).
Whats the quickest way to redraw an image or pixels, with an animated palette.

I dont mind relying on the extension GL_ARB_imaging, if that would be useful but I can find little information on it just now.

It would be best to be able to use texturing to achive this, but if regenerating texture's in runtime with different palettes I'd like to know about any possible alternatives, at a last resort I will just have to pre-render amounts of textures.

So wait, are you trying to fade from one picture from another? If that's the case, you can just have 2 textured quads (if you don't need mipmapping, you could even use GL_TEXTURE_RECTANGLE_ARB. You can then draw the one you're fading in on top, and step from alpha = 0 to alpha = 1, then stop drawing the previous one. (you'll want the texture to be set to GL_MODULATE for this) If this isn't what you want, can you be a little more specific?

Whats actually inside this image file I have is two images in the same place really, viewed with one palette I see the macplay logo and with another the id logo, a fade between them is done by tweening from on palette to the other.

What I'd like to do is draw textured quads with a indexed color data but put that through some palette to achieve the same effect, of course if this is slow I will be able to pre-render different palettized versions of the textures and use alpha like that,

There is no internal indexed format, but you can specify your client format as GL_COLOR_INDEX and have OpenGL do the palette mapping for you during texture upload. Read the glPixelMap and glPixelTransfer man pages.

Since this is CPU-side processing during texture upload, it might be too slow to animate textures. So if all you want to do is cross-fade two textures, you are probably better off uploading two textures and using alpha modulation, as mentioned above. But, you can still have GL do the mapping for you while uploading those two textures.

If you can use fragment shaders, you can use a 1D NEAREST-filtered texture as the palette, and a 2D, NEAREST-filtered, 1-channel texture as the indexed image, and use the fragment shader to perform the mapping. Then palette animation is a matter of swapping or updating the palette texture.

Doesn't sound like you need this here, but if you're porting something that has lots of palette animation, it might be useful.