init

Wraps IMG_Init which initializes selected SDL2_image image format subsystems

@safe @trusted
static if(bindSDLImage)
void
init
(
bool jpg = false
,
bool png = false
,
bool tif = false
,
bool webp = false
,
bool jxl = false
,
bool avif = false
,
bool everything = false
)

Parameters

jpg bool

selects the IMG_INIT_JPG subsystem

png bool

selects the IMG_INIT_PNG subsystem

tif bool

selects the IMG_INIT_TIF subsystem

webp bool

selects the IMG_INIT_WEBP subsystem

jxl bool

selects the IMG_INIT_JXL subsystem (from SDL_image 2.6)

avif bool

selects the IMG_INIT_AVIF subsystem (from SDL_image 2.6)

everything bool

selects every available subsystem

Throws

dsdl2.SDLException if any selected subsystem failed to initialize

Examples

dsdl2.image.init(everything : true);

Meta