sdl2/sdl2_image

Types

InitFlags = distinct cint

Consts

SDLimageStd = false
SDLimageGit = false
SDLimageDL = true
SDLimageStatic = true
SDLimageSetVer = ""
SDLimageLPath = "/Users/joey/Projects/nim-sdl2/src/build/sdl2_image/.libs/libSDL2_image.a"
SDLimagePath = "/Users/joey/Projects/nim-sdl2/src/build/sdl2_image/SDL_image.h"
SetError = ""
GetError = ""
ClearError = ""
IMAGE_MAJOR_VERSION = 2
IMAGE_MINOR_VERSION = 0
IMAGE_PATCHLEVEL = 5
INIT_JPG = 1'i32
INIT_PNG = 2'i32
INIT_TIF = 4'i32
INIT_WEBP = 8'i32

Procs

proc linked_Version(): ptr Version {...}{.importc: "IMG_Linked_Version", cdecl.}
This function gets the version of the dynamically linked SDL_image library.
   it should NOT be used to fill a version structure, instead you should
   use the SDL_IMAGE_VERSION() macro.
proc init(flags: cint): cint {...}{.importc: "IMG_Init", cdecl.}
Loads dynamic libraries and prepares them for use.  Flags should be
   one or more flags from IMG_InitFlags OR'd together.
   It returns the flags successfully initialized, or 0 on failure.
proc quit() {...}{.importc: "IMG_Quit", cdecl.}
Unloads libraries loaded with IMG_Init
proc loadTyped_RW(src: ptr RWops; freesrc: cint; kind: cstring): ptr Surface {...}{.
    importc: "IMG_LoadTyped_RW", cdecl.}
Load an image from an SDL data source.
   The 'type' may be one of: "BMP", "GIF", "PNG", etc.
   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);
proc load(file: cstring): ptr Surface {...}{.importc: "IMG_Load", cdecl.}
Convenience functions
proc load_RW(src: ptr RWops; freesrc: cint): ptr Surface {...}{.importc: "IMG_Load_RW", cdecl.}
proc loadTexture(renderer: ptr Renderer; file: cstring): ptr Texture {...}{.
    importc: "IMG_LoadTexture", cdecl.}
Load an image directly into a render texture.
proc loadTexture_RW(renderer: ptr Renderer; src: ptr RWops; freesrc: cint): ptr Texture {...}{.
    importc: "IMG_LoadTexture_RW", cdecl.}
proc loadTextureTyped_RW(renderer: ptr Renderer; src: ptr RWops; freesrc: cint;
                        kind: cstring): ptr Texture {...}{.
    importc: "IMG_LoadTextureTyped_RW", cdecl.}
proc isICO(src: ptr RWops): cint {...}{.importc: "IMG_isICO", cdecl.}
Functions to detect a file type, given a seekable source
proc isCUR(src: ptr RWops): cint {...}{.importc: "IMG_isCUR", cdecl.}
proc isBMP(src: ptr RWops): cint {...}{.importc: "IMG_isBMP", cdecl.}
proc isGIF(src: ptr RWops): cint {...}{.importc: "IMG_isGIF", cdecl.}
proc isJPG(src: ptr RWops): cint {...}{.importc: "IMG_isJPG", cdecl.}
proc isLBM(src: ptr RWops): cint {...}{.importc: "IMG_isLBM", cdecl.}
proc isPCX(src: ptr RWops): cint {...}{.importc: "IMG_isPCX", cdecl.}
proc isPNG(src: ptr RWops): cint {...}{.importc: "IMG_isPNG", cdecl.}
proc isPNM(src: ptr RWops): cint {...}{.importc: "IMG_isPNM", cdecl.}
proc isSVG(src: ptr RWops): cint {...}{.importc: "IMG_isSVG", cdecl.}
proc isTIF(src: ptr RWops): cint {...}{.importc: "IMG_isTIF", cdecl.}
proc isXCF(src: ptr RWops): cint {...}{.importc: "IMG_isXCF", cdecl.}
proc isXPM(src: ptr RWops): cint {...}{.importc: "IMG_isXPM", cdecl.}
proc isXV(src: ptr RWops): cint {...}{.importc: "IMG_isXV", cdecl.}
proc isWEBP(src: ptr RWops): cint {...}{.importc: "IMG_isWEBP", cdecl.}
proc loadICO_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadICO_RW", cdecl.}
Individual loading functions
proc loadCUR_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadCUR_RW", cdecl.}
proc loadBMP_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadBMP_RW", cdecl.}
proc loadGIF_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadGIF_RW", cdecl.}
proc loadJPG_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadJPG_RW", cdecl.}
proc loadLBM_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadLBM_RW", cdecl.}
proc loadPCX_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadPCX_RW", cdecl.}
proc loadPNG_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadPNG_RW", cdecl.}
proc loadPNM_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadPNM_RW", cdecl.}
proc loadSVG_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadSVG_RW", cdecl.}
proc loadTGA_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadTGA_RW", cdecl.}
proc loadTIF_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadTIF_RW", cdecl.}
proc loadXCF_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadXCF_RW", cdecl.}
proc loadXPM_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadXPM_RW", cdecl.}
proc loadXV_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadXV_RW", cdecl.}
proc loadWEBP_RW(src: ptr RWops): ptr Surface {...}{.importc: "IMG_LoadWEBP_RW", cdecl.}
proc readXPMFromArray(xpm: ptr cstring): ptr Surface {...}{.
    importc: "IMG_ReadXPMFromArray", cdecl.}
proc savePNG(surface: ptr Surface; file: cstring): cint {...}{.importc: "IMG_SavePNG", cdecl.}
Individual saving functions
proc savePNG_RW(surface: ptr Surface; dst: ptr RWops; freedst: cint): cint {...}{.
    importc: "IMG_SavePNG_RW", cdecl.}
proc saveJPG(surface: ptr Surface; file: cstring; quality: cint): cint {...}{.
    importc: "IMG_SaveJPG", cdecl.}
proc saveJPG_RW(surface: ptr Surface; dst: ptr RWops; freedst: cint; quality: cint): cint {...}{.
    importc: "IMG_SaveJPG_RW", cdecl.}