Source code for coverting compiled xpms

Hello,

Are there any examples of converting xpm graphics that are compiled into a
program to the format that SDL uses? I am in the process of porting a game to
SDL but all the graphics are compiled into the program. If not when I figure it
out I’ll be sure to report back.

–Andy

@Andy_Tarkinson

Are there any examples of converting xpm graphics that are compiled into a
program to the format that SDL uses? I am in the process of porting a game to
SDL but all the graphics are compiled into the program. If not when I figure it
out I’ll be sure to report back.

The Xpm library is probably the easiest to use for this. It will present you
with an array of colour indices and a list of colours, and from there it
should be fairly trivial to make an SDL surface.

Otherwise, bulk conversion from xpm to the format of your choice is easy as
well. The Imagemagick and Netpbm tools are especially useful for these tasks.