Image
module Pixmap : sig ... end
val create_rgb : ?alpha:bool -> ?max_val:int -> int -> int -> image
create_rgb ?alpha ?max_val width height
is an RGB image of dimensions width
* height
. Raises Invalid_argument
if width
or height
are negative, or if max_val
is not in the range [1;65535].
val create_grey : ?alpha:bool -> ?max_val:int -> int -> int -> image
create_rgb ?alpha ?max_val width height
is a greyscale image of dimensions width
* height
. Raises Invalid_argument
if width
or height
are negative, or if max_val
is not in the range [1;65535].
val read_rgba : image -> int -> int -> (int -> int -> int -> int -> 'a) -> 'a
val read_rgb : image -> int -> int -> (int -> int -> int -> 'a) -> 'a
val read_greya : image -> int -> int -> (int -> int -> 'a) -> 'a
val read_grey : image -> int -> int -> (int -> 'a) -> 'a
val write_rgba : image -> int -> int -> int -> int -> int -> int -> unit
val write_rgb : image -> int -> int -> int -> int -> int -> unit
val write_greya : image -> int -> int -> int -> int -> unit
val write_grey : image -> int -> int -> int -> unit
val fill_rgb : ?alpha:int -> image -> int -> int -> int -> unit
fill_rgb ?alpha image r g b
overwrites image
with r
,g
,b
colors. TODO
val fill_alpha : image -> int -> unit
copy image
is a copy of image
backed my a new memory allocation, so that the mutations of either copy are independent of each other
module type ReadImage = sig ... end
module type ReadImageStreaming = sig ... end
module type WriteImage = sig ... end
module Resize : sig ... end