[SDL] Problem when i load an XPM image

NeGflar negflar at katamail.com
Tue Jun 6 10:53:23 PDT 2006


>
> without looking at the problem one thing i have found is that imagemagick 
> will use the word black, brown red etc, instead of the hex code, which 
> sdl_image xpm cant handle, or at least didnt last time i used image majic 
> ;)
>

Hello,
I have seen the code but the colors are listed with exadecimal code.
I have the same problem with this simple code compiled with visual c++:

#ifdef WIN32
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")
#pragma comment(lib, "SDL_image.lib")
#endif

#include "SDL.h"
#include "SDL_image.h"
#include "myImg.xpm"

SDL_Surface *sfondo;

int main( int argc, char* args[] )
{

     if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
    {

          return false;
    }

     sfondo = IMG_ReadXPMFromArray( myImg );
}


I think that the problem is in conversion
Instead of Image Magick, wich other program under Windows can i use for 
convert a bmp to XPM?
Tank's





More information about the SDL mailing list