Quote Originally Posted by PP2005
I figured it out with help from the SDL mailing list. I just had to allocate memory for the r, g, b and a pointers. I thought the SDL_GetRGBA call did this, but guess not.
Hi 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