(index ("init!" 0) ("quit!" 1084) ("compiled-version" 1230) ("current-version" 1230) ("load" 2342) ("load*" 2342) ("load-rw" 3081) ("load-rw*" 3081) ("load-typed-rw" 4393) ("load-typed-rw*" 4393))
(def (sig (procedure "(init! #!optional loaders) → list of symbols" (id init!))) (p "See " (link "http://www.libsdl.org/projects/SDL_image/docs/SDL_image.html#SEC8" "IMG_Init") ".") (p (tt "loaders") " defaults to " (tt "'(jpg png tif)") ". It must be a list of zero or more of those symbols, indicating which image loaders to initialize. (Other image formats are built into SDL_image and do not need to be initialized.)") (p "Returns a list of symbols indicating all the image loaders that are now initialized. You should check the return value to see whether all the image loaders you requested were actually initialized. If not, " (tt "get-error") " from the sdl2 egg " (i "might") " return an error message explaining why the image loader could not be initialized. (This is a limitation of SDL_image.)") (p "It is not usually necessary to call this procedure. Image loaders will automatically be initialized when needed. But, you may wish to call this procedure to check whether a loader is available, or to initialize the loaders ahead of time to avoid a small delay later."))
(def (sig (procedure "(quit!)" (id quit!))) (p "See " (link "http://www.libsdl.org/projects/SDL_image/docs/SDL_image.html#SEC9" "IMG_Quit") "."))
(def (sig (procedure "(compiled-version) → list of fixnums" (id compiled-version)) (procedure "(current-version)  → list of fixnums" (id current-version))) (p "Returns a list of three nonnegative integers, indicating a version number of SDL_image. For example, the list " (tt "(2 0 0)") " indicates SDL_image 2.0.0.") (ul (li (tt "compiled-version") " returns the version of SDL_image that the sdl2-image egg was compiled with.") (li (tt "current-version") " returns the version of SDL_image that the sdl2-image egg is currently using.")) (p "For example, the user may have compiled the sdl2-image egg with SDL_image 2.0.1, then later upgraded SDL_image to 2.0.2, but not yet recompiled the sdl2-image egg with the new version. In such a case, " (tt "compiled-version") " would return " (tt "(2 0 1)") ", and " (tt "current-version") " would return " (tt "(2 0 2)") ". But, features from the new version would not be available until the user recompiles the sdl2-image egg.") (p "See " (link "http://www.libsdl.org/projects/SDL_image/docs/SDL_image.html#SEC7" "SDL_IMAGE_VERSION and IMG_LinkedVersion") "."))
(def (sig (procedure "(load  filepath) → sdl2:surface" (id load)) (procedure "(load* filepath) → sdl2:surface" (id load*))) (p "Attempts to load the image file at the given filepath (a string). The image may be any format supported by SDL_image. See " (link "http://www.libsdl.org/projects/SDL_image/docs/SDL_image.html#SEC11" "IMG_Load") ".") (p "Returns a " (int-link "/egg/sdl2#sdl2surface" "sdl2:surface") " with the image contents. Signals an exception of kind " (tt "(exn sdl2)") " if the image could not be loaded.") (ul (li (tt "load") " returns a managed sdl2:surface.") (li (tt "load*") " returns an unmanaged sdl2:surface, which must be freed with " (tt "free-surface!") " (from the sdl2 egg) when you are done with it.")))
(def (sig (procedure "(load-rw  rwops #!optional close?) → sdl2:surface" (id load-rw)) (procedure "(load-rw* rwops #!optional close?) → sdl2:surface" (id load-rw*))) (p "Attempts to load an image from an " (int-link "/egg/sdl2#rwops" "sdl2:rwops") ". This procedure allows you to load an image from a variety of sources, such as a " (int-link "/man/4/Unit library#blobs" "blob") ", string, memory pointer, or file. See " (link "http://www.libsdl.org/projects/SDL_image/docs/SDL_image.html#SEC12" "IMG_Load_RW") ".") (p "The image may be any format supported by SDL_image, except TGA. If you want to load a TGA image from an sdl2:rwops, you should use " (tt "load-typed-rw") " instead.") (p "If " (tt "close?") " is #t, the sdl2:rwops will be automatically closed after the image is loaded. See " (tt "rw-close!") " in the sdl2 egg. If " (tt "close?") " is #f (the default), the sdl2:rwops will not be closed.") (p "Returns a " (int-link "/egg/sdl2#sdl2surface" "sdl2:surface") " with the image contents. Signals an exception of kind " (tt "(exn sdl2)") " if the image could not be loaded.") (ul (li (tt "load-rw") " returns a managed sdl2:surface.") (li (tt "load-rw*") " returns an unmanaged sdl2:surface, which must be freed with " (tt "free-surface!") " (from the sdl2 egg) when you are done with it.")))
(def (sig (procedure "(load-typed-rw  rwops close? type-hint) → sdl2:surface" (id load-typed-rw)) (procedure "(load-typed-rw* rwops close? type-hint) → sdl2:surface" (id load-typed-rw*))) (p "See " (link "http://www.libsdl.org/projects/SDL_image/docs/SDL_image.html#SEC13" "IMG_LoadTyped_RW") ".") (p "Similar to " (tt "load-rw") ", except you also give a hint to help SDL_image figure out what the image format is. In practice, this is only necessary when loading a TGA image from an sdl2:rwops. For other image formats you can just use " (tt "load-rw") " instead.") (p (tt "type-hint") " must be one of the following strings (case is not important):") (ul (li (tt "\"BMP\"")) (li (tt "\"CUR\"")) (li (tt "\"GIF\"")) (li (tt "\"ICO\"")) (li (tt "\"JPG\"")) (li (tt "\"LBM\"")) (li (tt "\"PCX\"")) (li (tt "\"PNG\"")) (li (tt "\"PNM\"")) (li (tt "\"TGA\"")) (li (tt "\"TIF\"")) (li (tt "\"XCF\"")) (li (tt "\"XPM\"")) (li (tt "\"XV\""))) (p "Returns a " (int-link "/egg/sdl2#sdl2surface" "sdl2:surface") " containing the image. Signals an exception of kind " (tt "(exn sdl2)") " if the image could not be loaded.") (ul (li (tt "load-rw-typed") " returns a managed sdl2:surface.") (li (tt "load-rw-typed*") " returns an unmanaged sdl2:surface, which must be freed with " (tt "free-surface!") " (from the sdl2 egg) when you are done with it.")))
