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

3.2.9 IMG_LoadXCF_RW

SDL_Surface *IMG_LoadXCF_RW(SDL_RWops *src)

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

Load src as a XCF image for use as a surface, if XCF support is compiled into the SDL_image library.

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

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

See Also:
3.2.3 IMG_LoadTyped_RW, 3.3.6 IMG_isXCF



This document was generated on November, 3 2009 using texi2html