Hi PP2005,Originally Posted by PP2005
I do it like so:
[pascal]var theimage : PSDL_Surface;
pixel : Uint32;
fmt : PSDL_PixelFormat;
r, g, b, a : Uint8;
[...]
theimage := IMG_Load('test.png');
fmt := theimage^.format;
pixel := SDL_GetPixel(theimage, y, x);
SDL_GetRGBA(pixel, fmt, @r, @g, @b, @a);[/pascal]
So I don't have to allocate any memory myself
cheers,
Paul
Bookmarks