package tsdl-image

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

SDL2_image bindings for use with Tsdl

References

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

Initialization

module Init : sig ... end
val init : Init.t -> Init.t
val quit : unit -> unit
type format =
  1. | Ico
  2. | Cur
  3. | Bmp
  4. | Gif
  5. | Jpg
  6. | Lbm
  7. | Pcx
  8. | Png
  9. | Pnm
  10. | Tif
  11. | Xcf
  12. | Xpm
  13. | Xv
  14. | Webp
  15. | Tga

Loading

val load : string -> Tsdl.Sdl.surface result
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

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.

OCaml

Innovation. Community. Security.