SDL_AllocFormat in the API?

Hello all !

I’d like to convert a surface to a custom pixel format. So I obviously must
use SDL_ConvertSurface but then I have to supply the pixelformat and as I
don’t like to fill in all the fields myself, I’d like to use SDL_AllocFormat
but I don’t have “access” to it. So… Wouldn’t it be usefull to expose this
function (and maybe some others too) in the public API? or is there another
way to do what I want?

Tanks,
Gaetan.

“Gaetan de Menten” wrote:

So… Wouldn’t it be usefull to expose this
function (and maybe some others too) in the public API? or is there another
way to do what I want?

use CreateRGBSurface to create your new surface, and BlitSurface to copy
the contents from another surface. The blit will convert automatically