SDL Wiki
(This function is part of SDL_image, a separate library from SDL.)

IMG_LoadTyped_RW

Load an image from an SDL data source.

Syntax

SDL_Surface * IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, const char *type);

Function Parameters

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.

Return Value

Returns SDL surface, or NULL on error.

Remarks

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);

IMG_Load
IMG_Load_RW
SDL_FreeSurface

CategoryAPI


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.