chickadee » sdl2-image » init!

init! #!optional loadersprocedure

See IMG_Init.

loaders defaults to '(jpg png tif). It must be a list of zero or more of those symbols, indicating which image loaders to initialize. (Other image formats are built into SDL_image and do not need to be initialized.)

Returns a list of symbols indicating all the image loaders that are now initialized, including any that were already initialized. You should check the return value to see whether all the image loaders you requested were actually initialized. If not, get-error from the sdl2 egg might return an error message explaining why the image loader could not be initialized. (This is a limitation of SDL_image.)

It is not usually necessary to call this procedure. Image loaders will automatically be initialized when needed. But, you may wish to call this procedure to check whether a loader is available, or to initialize the loaders ahead of time to avoid a small delay later.