module type IMAGEINDEXED =sig..end
type t
type elt
type mapelt
val create : int -> int -> tcreate w h creates an image with a size wxh. The content is
the image is not initialized.val make : int -> int -> elt -> tmake w h c creates an image with a size wxh. The content is
the image is initialized to the color c.val destroy : t -> unitdestroy t explicitly frees the image content of t.
If you do not use bitmap swap files, you do not need to call
this function, since GC will free unreachable image data automatically.
Read bitmap.mli for more details.val get : t -> int -> int -> eltget t x y gets image pixel of t at x,y. If x,y is
outside of the image size, Images.Out_of_image exception is raised.val get_color : t -> int -> int -> mapeltget_color x y returns image pixel color value of t at x,y.
If x,y is outside of the image size, Images.Out_of_image exception
is raised.val set : t -> int -> int -> elt -> unitset t x y c sets image pixel of t at x,y by the color c.
If x,y is outside of the image size, Images.Out_of_image exception
is raised.val unsafe_get : t -> int -> int -> eltval unsafe_get_color : t -> int -> int -> mapeltval unsafe_set : t -> int -> int -> elt -> unitget and set. It does not perform any image
boundary check. If the coordinates are out of the given image,
the result is undefined. Use carefully.val copy : t -> t
copy t duplicates the image t.
val sub : t ->
int -> int -> int -> int -> tsub t x y w h duplicates a subimage of t of size wxh,
whose origin (0,0) is at (x,y) of t.val blit : t ->
int -> int -> t -> int -> int -> int -> int -> unitblit src x y dst x' y' w h copies rectangular area of src at
x,y with size wxh, to an image dst. The origin of
the subimage comes at x',y' of dst.val map : (elt ->
elt -> elt) ->
t ->
int -> int -> t -> int -> int -> int -> int -> unitmap f src x y dst x' y' w h maps pixels of the rectangular area
of src at x,y with size wxh, to an image dst,
using color conversion function f. The origin of the subimage
comes at x',y' of dst.val dump : t -> stringval unsafe_access : t -> int -> int -> string * intval get_strip : t -> int -> int -> int -> stringval set_strip : t -> int -> int -> int -> string -> unitval get_scanline : t -> int -> stringval set_scanline : t -> int -> string -> unit