[SDL] Copy problem
DAVOINE Jérôme
jerome.davoine at sesam-vitale.fr
Fri Oct 4 05:05:01 PDT 2002
Hello all,
i've a little problem when copying SDL_Surface pixels to allocated data :
void* data;
int imageSize;
SDL_Surface *image = IMG_Load("c:\\test.jpg"); // image successfully loaded
using SDL_Image
imageSize= 32/*because my image depth is 32*/ * image->w * image->h;
data = (void*) malloc (imageSize);
memcpy (data, image->pixels, imageSize); //the program hangs here
Does anyone have encountered the same problem ?
Thanks
More information about the SDL
mailing list