Load an image from an SDL data source.
int freesrc, const char *type); SDL_Surface * IMG_LoadTyped_RW(SDL_RWops *src,
src |
RWops |
freesrc |
can be set so that the RWops is freed after this function is called |
type |
may be one of: "BMP", "GIF", "PNG", etc. |
Returns SDL surface, or NULL on error.
If the image format supports a transparent pixel, SDL will set the colorkey for the surface. You can enable RLE acceleration on the surface afterwards by calling: SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);