Module Tsdl_image.Image

type 'a result = 'a Tsdl.Sdl.result

Initialization

module Init : sig ... end
val init : Init.t Init.t

IMG_Init

val quit : unit unit

IMG_Quit

type format =
| Ico
| Cur
| Bmp
| Gif
| Jpg
| Lbm
| Pcx
| Png
| Pnm
| Tif
| Xcf
| Xpm
| Xv
| Webp
| Tga

Loading

val load : string Tsdl.Sdl.surface result

IMG_Load

val load_rw : Tsdl.Sdl.rw_ops bool Tsdl.Sdl.surface result

IMG_Load_RW

val load_typed_rw : Tsdl.Sdl.rw_ops bool format Tsdl.Sdl.surface result

IMG_LoadTyped_RW

val load_texture : Tsdl.Sdl.renderer string Tsdl.Sdl.texture result
val load_texture_rw : Tsdl.Sdl.renderer Tsdl.Sdl.rw_ops bool Tsdl.Sdl.texture result
val load_texture_typed_rw : Tsdl.Sdl.renderer Tsdl.Sdl.rw_ops bool format Tsdl.Sdl.texture result
val load_format_rw : format Tsdl.Sdl.rw_ops Tsdl.Sdl.surface result
val read_xpm_from_array : string Tsdl.Sdl.surface result

IMG_ReadXPMFromArray

Saving

val save_png : Tsdl.Sdl.surface string int
val save_png_rw : Tsdl.Sdl.surface Tsdl.Sdl.rw_ops bool int

Info

val is_format : format Tsdl.Sdl.rw_ops bool

IMG_is*

Note that, uniquely, is_format Tga will throw an exception, as SDL_image does not support testing if a file is in Targa format.