[SDL] Copy problem
Alexander Pipelka
pipelka at teleweb.at
Fri Oct 4 05:30:03 PDT 2002
Am Freitag, 4. Oktober 2002 14:04 schrieb DAVOINE Jérôme:
> 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;
32*8 = 256
Your image depth is 256 ?
:))
> data = (void*) malloc (imageSize);
> memcpy (data, image->pixels, imageSize); //the program hangs here
>
>
> Does anyone have encountered the same problem ?
Yep.
Alex
More information about the SDL
mailing list