- load-typed-rw rwops close? type-hintprocedure
- load-typed-rw* rwops close? type-hintprocedure
See IMG_LoadTyped_RW.
Similar to 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 load-rw instead.
type-hint must be one of the following strings (case is not important):
- "BMP"
- "CUR"
- "GIF"
- "ICO"
- "JPG"
- "LBM"
- "PCX"
- "PNG"
- "PNM"
- "TGA"
- "TIF"
- "XCF"
- "XPM"
- "XV"
Returns a sdl2:surface containing the image. Signals an exception of kind (exn sdl2) if the image could not be loaded.
- load-rw-typed returns a managed sdl2:surface.
- load-rw-typed* returns an unmanaged sdl2:surface, which must be freed with free-surface! (from the sdl2 egg) when you are done with it.