SDL_image don't load different images of .bmp

Hi,
My program run well if i load .bmp textures, but if put a different type of file, windows says to me “the program have to close…” and my opengl windows don’t appear.
What have i done of wrong ?

i do this :

SDL_Surface *texture=IMG_Load(“eyeball.tif”) ;

img_load returns and its value is 0x00000,
do you know what it means ?
i have also seen that in fact the program crashes here :
glTexImage2D(GL_TEXTURE_2D, 0, 3, texture->w,
texture->h,0,GL_RGB,GL_UNSIGNED_BYTE, texture->pixels);

Firstly Your In the Wrong forum this is for OpenGL not SDL :rolleyes:

The reason your program is crashing is that you are trying to use a NULL pointer SDL_Surface *texture is set to NULL when you use IMG_Load with an invalid image type

Check the documentation for SDL and your IMG_Load function to see what image formats are supported.