Help with SDL_Image

I need some help with using SDL_Image. I looked at the header, and saw the
function prototypes took an argument of type SDL_RWops*, so I looked at the
SDL_rwops header. I am assuming I need to use the function to load from a
file, but I am not sure what the argument char *mode is for. If someone
could show me an example of loading an image with SDL_Image, please show me,
and am I mistaking that I need to use an SDL_RWops?

Thanks in advance
Mike S. Codename: Freak901010_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

mike shoup wrote:

I need some help with using SDL_Image. I looked at the header, and saw
the function prototypes took an argument of type SDL_RWops*, so I looked
at the SDL_rwops header. I am assuming I need to use the function to
load from a file, but I am not sure what the argument char *mode is for.
If someone could show me an example of loading an image with SDL_Image,
please show me, and am I mistaking that I need to use an SDL_RWops?

Thanks in advance
Mike S. Codename: Freak901010

You can simply use the following function from SDL_image:

SDL_Surface *IMG_Load(const char *file);

which takes a filename, and returns a new Surface by pointer, or NULL on errors.–
-==-
Jon Atkins
http://jcatki.2y.net/