# QuickReferenceNoUnicode If you want to paste this into a text editor that can handle fancy Unicode section headers, try using [QuickReference](QuickReference) instead. ```c // SDL3_image API Quick Reference // // https://libsdl.org/ // // The latest version of this document can be found at https://wiki.libsdl.org/SDL3_image/QuickReference // Based on SDL_image version 3.1.0 // // This can be useful in an IDE with search and syntax highlighting. // // Original idea for this document came from Dan Bechard (thanks!) // ASCII art generated by: https://patorjk.com/software/taag/#p=display&f=ANSI%20Shadow (with modified 'S' for readability) // XXXXXX XXXXXX XX XX XXX XXX XXXXX XXXXXX XXXXXXX // XX XX XX XX XX XXXX XXXX XX XX XX XX // XXXXXXX XX XX XX XX XX XXXX XX XXXXXXX XX XXX XXXXX // XX XX XX XX XX XX XX XX XX XX XX XX XX // XXXXXX XXXXXX XXXXXXX XX XX XX XX XX XXXXXX XXXXXXX #define SDL_IMAGE_MAJOR_VERSION // Printable format: "%d.%d.%d", MAJOR, MINOR, MICRO #define SDL_IMAGE_VERSION // This is the version number macro for the current SDL_image version. #define SDL_IMAGE_VERSION_ATLEAST(X, Y, Z) // This macro will evaluate to true if compiled with SDL_image at least X.Y.Z. int IMG_Version(void); // This function gets the version of the dynamically linked SDL_image library. SDL_Surface * IMG_LoadTyped_IO(SDL_IOStream *src, bool closeio, const char *type); // Load an image from an SDL data source into a software surface. SDL_Surface * IMG_Load(const char *file); // Load an image from a filesystem path into a software surface. SDL_Surface * IMG_Load_IO(SDL_IOStream *src, bool closeio); // Load an image from an SDL data source into a software surface. SDL_Texture * IMG_LoadTexture(SDL_Renderer *renderer, const char *file); // Load an image from a filesystem path into a GPU texture. SDL_Texture * IMG_LoadTexture_IO(SDL_Renderer *renderer, SDL_IOStream *src, bool closeio); // Load an image from an SDL data source into a GPU texture. SDL_Texture * IMG_LoadTextureTyped_IO(SDL_Renderer *renderer, SDL_IOStream *src, bool closeio, const char *type); // Load an image from an SDL data source into a GPU texture. bool IMG_isAVIF(SDL_IOStream *src); // Detect AVIF image data on a readable/seekable SDL_IOStream. bool IMG_isICO(SDL_IOStream *src); // Detect ICO image data on a readable/seekable SDL_IOStream. bool IMG_isCUR(SDL_IOStream *src); // Detect CUR image data on a readable/seekable SDL_IOStream. bool IMG_isBMP(SDL_IOStream *src); // Detect BMP image data on a readable/seekable SDL_IOStream. bool IMG_isGIF(SDL_IOStream *src); // Detect GIF image data on a readable/seekable SDL_IOStream. bool IMG_isJPG(SDL_IOStream *src); // Detect JPG image data on a readable/seekable SDL_IOStream. bool IMG_isJXL(SDL_IOStream *src); // Detect JXL image data on a readable/seekable SDL_IOStream. bool IMG_isLBM(SDL_IOStream *src); // Detect LBM image data on a readable/seekable SDL_IOStream. bool IMG_isPCX(SDL_IOStream *src); // Detect PCX image data on a readable/seekable SDL_IOStream. bool IMG_isPNG(SDL_IOStream *src); // Detect PNG image data on a readable/seekable SDL_IOStream. bool IMG_isPNM(SDL_IOStream *src); // Detect PNM image data on a readable/seekable SDL_IOStream. bool IMG_isSVG(SDL_IOStream *src); // Detect SVG image data on a readable/seekable SDL_IOStream. bool IMG_isQOI(SDL_IOStream *src); // Detect QOI image data on a readable/seekable SDL_IOStream. bool IMG_isTIF(SDL_IOStream *src); // Detect TIFF image data on a readable/seekable SDL_IOStream. bool IMG_isXCF(SDL_IOStream *src); // Detect XCF image data on a readable/seekable SDL_IOStream. bool IMG_isXPM(SDL_IOStream *src); // Detect XPM image data on a readable/seekable SDL_IOStream. bool IMG_isXV(SDL_IOStream *src); // Detect XV image data on a readable/seekable SDL_IOStream. bool IMG_isWEBP(SDL_IOStream *src); // Detect WEBP image data on a readable/seekable SDL_IOStream. SDL_Surface * IMG_LoadAVIF_IO(SDL_IOStream *src); // Load a AVIF image directly. SDL_Surface * IMG_LoadICO_IO(SDL_IOStream *src); // Load a ICO image directly. SDL_Surface * IMG_LoadCUR_IO(SDL_IOStream *src); // Load a CUR image directly. SDL_Surface * IMG_LoadBMP_IO(SDL_IOStream *src); // Load a BMP image directly. SDL_Surface * IMG_LoadGIF_IO(SDL_IOStream *src); // Load a GIF image directly. SDL_Surface * IMG_LoadJPG_IO(SDL_IOStream *src); // Load a JPG image directly. SDL_Surface * IMG_LoadJXL_IO(SDL_IOStream *src); // Load a JXL image directly. SDL_Surface * IMG_LoadLBM_IO(SDL_IOStream *src); // Load a LBM image directly. SDL_Surface * IMG_LoadPCX_IO(SDL_IOStream *src); // Load a PCX image directly. SDL_Surface * IMG_LoadPNG_IO(SDL_IOStream *src); // Load a PNG image directly. SDL_Surface * IMG_LoadPNM_IO(SDL_IOStream *src); // Load a PNM image directly. SDL_Surface * IMG_LoadSVG_IO(SDL_IOStream *src); // Load a SVG image directly. SDL_Surface * IMG_LoadQOI_IO(SDL_IOStream *src); // Load a QOI image directly. SDL_Surface * IMG_LoadTGA_IO(SDL_IOStream *src); // Load a TGA image directly. SDL_Surface * IMG_LoadTIF_IO(SDL_IOStream *src); // Load a TIFF image directly. SDL_Surface * IMG_LoadXCF_IO(SDL_IOStream *src); // Load a XCF image directly. SDL_Surface * IMG_LoadXPM_IO(SDL_IOStream *src); // Load a XPM image directly. SDL_Surface * IMG_LoadXV_IO(SDL_IOStream *src); // Load a XV image directly. SDL_Surface * IMG_LoadWEBP_IO(SDL_IOStream *src); // Load a WEBP image directly. SDL_Surface * IMG_LoadSizedSVG_IO(SDL_IOStream *src, int width, int height); // Load an SVG image, scaled to a specific size. SDL_Surface * IMG_ReadXPMFromArray(char **xpm); // Load an XPM image from a memory array. SDL_Surface * IMG_ReadXPMFromArrayToRGB888(char **xpm); // Load an XPM image from a memory array. bool IMG_SaveAVIF(SDL_Surface *surface, const char *file, int quality); // Save an SDL_Surface into a AVIF image file. bool IMG_SaveAVIF_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, int quality); // Save an SDL_Surface into AVIF image data, via an SDL_IOStream. bool IMG_SavePNG(SDL_Surface *surface, const char *file); // Save an SDL_Surface into a PNG image file. bool IMG_SavePNG_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio); // Save an SDL_Surface into PNG image data, via an SDL_IOStream. bool IMG_SaveJPG(SDL_Surface *surface, const char *file, int quality); // Save an SDL_Surface into a JPEG image file. bool IMG_SaveJPG_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, int quality); // Save an SDL_Surface into JPEG image data, via an SDL_IOStream. IMG_Animation * IMG_LoadAnimation(const char *file); // Load an animation from a file. IMG_Animation * IMG_LoadAnimation_IO(SDL_IOStream *src, bool closeio); // Load an animation from an SDL_IOStream. IMG_Animation * IMG_LoadAnimationTyped_IO(SDL_IOStream *src, bool closeio, const char *type); // Load an animation from an SDL datasource void IMG_FreeAnimation(IMG_Animation *anim); // Dispose of an IMG_Animation and free its resources. IMG_Animation * IMG_LoadGIFAnimation_IO(SDL_IOStream *src); // Load a GIF animation directly. IMG_Animation * IMG_LoadWEBPAnimation_IO(SDL_IOStream *src); // Load a WEBP animation directly. ```