Copy an image and even more

What would be the most efficient way to duplicate once surface to another?

I’m creating a new image that’s the size of the source.
copying the flags

removing colour key from source if it existed

copy image over

putting colour key back if it existed*************

Also, I’m creating a dynamic library of classes to include in a number of
projects, and they have an extern image that gets set in the main program
that calls the dll.
The problem is, setting that variable in the main doesn’t set the externally
defined same variable in the dll.
I assume because they’re considered quite separate entities they don’t
’link’ together.
Can I get around this?


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

What would be the most efficient way to duplicate once surface to another?

SDL_ConvertSurface() should be as good as any