Module dsdl2.image

Functions

NameDescription
getVersion() Wraps IMG_Linked_version which gets the version of the linked SDL2_image library
init(jpg, png, tif, webp, jxl, avif, everything) Wraps IMG_Init which initializes selected SDL2_image image format subsystems
load(file) Wraps IMG_Load which loads an image from a filesystem path into a software dsdl2.Surface
loadAnimation(file) Wraps IMG_LoadAnimation (from SDL_image 2.6) which loads an animation from a filesystem path into an Animation
loadAnimationRaw(data) Wraps IMG_LoadAnimation_RW (from SDL_image 2.6) which loads an animation from a data buffer into a Animation
loadAnimationTypedRaw(data, type) Wraps IMG_LoadAnimationTyped_RW (from SDL_image 2.6) which loads a typed image from a data buffer into a Animation
loadGIFAnimationRaw(data) Wraps IMG_LoadGIFAnimation_RW (from SDL_image 2.6) which loads a Animation from a buffer of animated GIF file format
loadRaw(data) Wraps IMG_Load_RW which loads an image from a data buffer into a software dsdl2.Surface
loadRaw(data, type) Wraps IMG_LoadTyped_RW which loads a typed image from a data buffer into a software dsdl2.Surface
loadSizedSVGRaw(data, size) Wraps IMG_LoadSizedSVG_RW (from SDL_image 2.6) which loads a dsdl2.Surface image from a buffer of SVG file format, while providing the desired flattened size of the vector image
loadSO(libName) Loads the SDL2_image shared dynamic library, which wraps bindbc-sdl's loadSDLImage function
loadTexture(renderer, file) Wraps IMG_LoadTexture which loads an image from a filesystem path into a hardware dsdl2.Texture
loadTextureRaw(renderer, data) Wraps IMG_LoadTexture_RW which loads an image from a data buffer into a hardware dsdl2.Texture
loadTextureRaw(renderer, data, type) Wraps IMG_LoadTextureTyped_RW which loads a typed image from a data buffer into a hardware dsdl2.Texture
quit() Wraps IMG_Quit which entirely deinitializes SDL2_image
saveJPG(surface, file, quality) Wraps IMG_SaveJPG (from SDL_image 2.0.2) which saves a dsdl2.Surface image into a JPG file in the filesystem
saveJPGRaw(surface, quality) Wraps IMG_SaveJPG_RW (from SDL_image 2.0.2) which saves a dsdl2.Surface image into a buffer of JPG file format
savePNG(surface, file) Wraps IMG_SavePNG which saves a dsdl2.Surface image into a PNG file in the filesystem
savePNGRaw(surface) Wraps IMG_SavePNG_RW which saves a dsdl2.Surface image into a buffer of PNG file format

Classes

NameDescription
Animation D class that wraps IMG_Animation (from SDL_image 2.6) storing multiple dsdl2.Surfaces of an animation

Aliases

NameTypeDescription
isAVIF _isType!(IMG_isAVIF,6) Wraps IMG_isAVIF which checks whether data is an AVIF file (from SDL_image 2.6)
isBMP _isType!IMG_isBMP Wraps IMG_isBMP which checks whether data is a BMP file
isCUR _isType!IMG_isCUR Wraps IMG_isCUR which checks whether data is a CUR file
isGIF _isType!IMG_isGIF Wraps IMG_isGIF which checks whether data is a GIF file
isICO _isType!IMG_isICO Wraps IMG_isICO which checks whether data is an ICO file
isJPG _isType!IMG_isJPG Wraps IMG_isJPG which checks whether data is a JPG file
isJXL _isType!(IMG_isJXL,6) Wraps IMG_isJXL which checks whether data is a JXL file (from SDL_image 2.6)
isLBM _isType!IMG_isLBM Wraps IMG_isLBM which checks whether data is a LBM file
isPCX _isType!IMG_isPCX Wraps IMG_isPCX which checks whether data is a PCX file
isPNG _isType!IMG_isPNG Wraps IMG_isPNG which checks whether data is a PNG file
isPNM _isType!IMG_isPNM Wraps IMG_isPNM which checks whether data is a PNM file
isQOI _isType!(IMG_isQOI,6) Wraps IMG_isQOI which checks whether data is a QOI file (from SDL_image 2.6)
isSVG _isType!(IMG_isSVG,0,2) Wraps IMG_isSVG which checks whether data is a SVG file (from SDL_image 2.0.2)
isTIF _isType!IMG_isTIF Wraps IMG_isTIF which checks whether data is a TIF file
isWEBP _isType!IMG_isWEBP Wraps IMG_isWEBP which checks whether data is a WEBP file
isXCF _isType!IMG_isXCF Wraps IMG_isXCF which checks whether data is an XCF file
isXPM _isType!IMG_isXPM Wraps IMG_isXPM which checks whether data is an XPM file
isXV _isType!IMG_isXV Wraps IMG_isXV which checks whether data is an XV file
loadAVIFRaw _loadTypeRaw!(IMG_LoadAVIF_RW,6) Wraps IMG_LoadAVIF_RW which loads data as an AVIF image (from SDL_image 2.6)
loadBMPRaw _loadTypeRaw!IMG_LoadBMP_RW Wraps IMG_LoadBMP_RW which loads data as a BMP image to surface
loadCURRaw _loadTypeRaw!IMG_LoadCUR_RW Wraps IMG_LoadCUR_RW which loads data as a CUR image to surface
loadGIFRaw _loadTypeRaw!IMG_LoadGIF_RW Wraps IMG_LoadGIF_RW which loads data as a GIF image to surface
loadICORaw _loadTypeRaw!IMG_LoadICO_RW Wraps IMG_LoadICO_RW which loads data as an ICO image to surface
loadJPGRaw _loadTypeRaw!IMG_LoadJPG_RW Wraps IMG_LoadJPG_RW which loads data as a JPG image to surface
loadJXLRaw _loadTypeRaw!(IMG_LoadJXL_RW,6) Wraps IMG_LoadJXL_RW which loads data as a JXL image (from SDL_image 2.6)
loadLBRaw _loadTypeRaw!IMG_LoadLBM_RW Wraps IMG_LoadLBM_RW which loads data as a LBM image to surface
loadPCXRaw _loadTypeRaw!IMG_LoadPCX_RW Wraps IMG_LoadPCX_RW which loads data as a PCX image to surface
loadPNGRaw _loadTypeRaw!IMG_LoadPNG_RW Wraps IMG_LoadPNG_RW which loads data as a PNG image to surface
loadPNMRaw _loadTypeRaw!IMG_LoadPNM_RW Wraps IMG_LoadPNM_RW which loads data as a PNM image to surface
loadQOIRaw _loadTypeRaw!(IMG_LoadQOI_RW,6) Wraps IMG_LoadQOI_RW which loads data as a QOI image (from SDL_image 2.6)
loadSVGRaw _loadTypeRaw!(IMG_LoadSVG_RW,0,2) Wraps IMG_LoadSVG_RW which loads data as a SVG image (from SDL_image 2.0.2)
loadTIFRaw _loadTypeRaw!IMG_LoadTIF_RW Wraps IMG_LoadTIF_RW which loads data as a TIF image to surface
loadWEBPRaw _loadTypeRaw!IMG_LoadWEBP_RW Wraps IMG_LoadWEBP_RW which loads data as a WEBP image to surface
loadXCFRaw _loadTypeRaw!IMG_LoadXCF_RW Wraps IMG_LoadXCF_RW which loads data as an XCF image to surface
loadXPMRaw _loadTypeRaw!IMG_LoadXPM_RW Wraps IMG_LoadXPM_RW which loads data as an XPM image to surface
loadXVRaw _loadTypeRaw!IMG_LoadXV_RW Wraps IMG_LoadXV_RW which loads data as an XV image as surface