IMG_Load_RW() not working

Hi,
I’ve just starting using SDL_RWops stuff, and was trying out the
SDL_image method to load from one. It seems to load it fine, but
then blitting doesn’t work.

SDL_RWops *file = SDL_RWFromFile(“picture.png”);
SDL_Surface *pic = IMG_Load_RW(file, 0);
while (!done)
{
SDL_BlitSurface(pic,NULL,screen,NULL);
//flip etc…
}

The above doesn’t work, but the below does

SDL_Surface *pic = IMG_Load(“picture.png”);
//looped blit, etc.

I’ve also played around with reading/writing text from SDL_RWops
contexts, and that seems to work fine. I might concur that
IMG_Load_RW() isn’t working properly but surely other people have
it working? I did have a look at the source and after the main RW
function, the end of the source file defines another one which
returns NULL. I don’t know if that’s just to keep the compiler
happy, or if it doesn’t work.

Any ideas?
Thanks
Nick