[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2.5 IMG_LoadICO_RW

SDL_Surface *IMG_LoadICO_RW(SDL_RWops *src)

The source SDL_RWops as a pointer. The icon image is loaded from this.

Load src as a Windows Icon image for use as a surface, if BMP support is compiled into the SDL_image library. The ICO's mask is put into to per pixel alpha in the surface. For files with multiple images, the first one found with the highest color count is chosen.

Returns: a pointer to the image as a new SDL_Surface. NULL is returned on errors, like if BMP is not supported, or a read error.

// load sample.ico into image
SDL_Surface *image;
SDL_RWops *rwop;
rwop=SDL_RWFromFile("sample.ico", "rb");
if(!image) {
    printf("IMG_LoadICO_RW: %s\n", IMG_GetError());
    // handle error

See Also:
3.2.3 IMG_LoadTyped_RW, 3.3.2 IMG_isICO

This document was generated on November, 3 2009 using texi2html