Function init
Wraps IMG_Init which initializes selected SDL2_image image format subsystems
void init
(
bool jpg = false,
bool png = false,
bool tif = false,
bool webp = false,
bool jxl = false,
bool avif = false,
bool everything = false
) @trusted;
Parameters
| Name | Description |
|---|---|
| jpg | selects the IMG_INIT_JPG subsystem |
| png | selects the IMG_INIT_PNG subsystem |
| tif | selects the IMG_INIT_TIF subsystem |
| webp | selects the IMG_INIT_WEBP subsystem |
| jxl | selects the IMG_INIT_JXL subsystem (from SDL_image 2.6) |
| avif | selects the IMG_INIT_AVIF subsystem (from SDL_image 2.6) |
| everything | selects every available subsystem |
Throws
dsdl if any selected subsystem failed to initialize
Example
dsdl .image .init(everything : true);