sig
exception Out_of_image
exception Wrong_image_type
exception Wrong_file_type
type t =
Index8 of Index8.t
| Rgb24 of Rgb24.t
| Index16 of Index16.t
| Rgba32 of Rgba32.t
| Cmyk32 of Cmyk32.t
type sequence = {
seq_width : int;
seq_height : int;
seq_frames : Images.frame list;
seq_loops : int;
}
and frame = {
frame_left : int;
frame_top : int;
frame_image : Images.t;
frame_delay : int;
}
type rgb =
Color.rgb = {
mutable r : int;
mutable g : int;
mutable b : int;
}
type rgba = Color.rgba = { color : Images.rgb; mutable alpha : int; }
type cmyk =
Color.cmyk = {
mutable c : int;
mutable m : int;
mutable y : int;
mutable k : int;
}
type 'a map = 'a Color.map = { mutable max : int; mutable map : 'a array; }
type format = Gif | Bmp | Jpeg | Tiff | Png | Xpm | Ppm | Ps
val extension : Images.format -> string
val guess_format : string -> Images.format
val get_extension : string -> string * string
val guess_extension : string -> Images.format
type colormodel = Info.colormodel = Gray | RGB | Index | GrayA | RGBA
type info =
Info.info =
Info_DPI of float
| Info_BigEndian
| Info_LittleEndian
| Info_ColorModel of Images.colormodel
| Info_Depth of int
| Info_Corrupted
val dpi : Images.info list -> float option
type header = {
header_width : int;
header_height : int;
header_infos : Images.info list;
}
val file_format : string -> Images.format * Images.header
type load_option =
Load_Progress of (float -> unit)
| Load_Resolution of float * float
type save_option =
Save_Quality of int
| Save_Progress of (float -> unit)
| Save_Interlace
val load_progress : Images.load_option list -> (float -> unit) option
val load_resolution : Images.load_option list -> (float * float) option
val save_progress : Images.save_option list -> (float -> unit) option
val save_interlace : Images.save_option list -> bool
val save_quality : Images.save_option list -> int option
type format_methods = {
check_header : string -> Images.header;
load : (string -> Images.load_option list -> Images.t) option;
save : (string -> Images.save_option list -> Images.t -> unit) option;
load_sequence :
(string -> Images.load_option list -> Images.sequence) option;
save_sequence :
(string -> Images.save_option list -> Images.sequence -> unit) option;
}
val add_methods : Images.format -> Images.format_methods -> unit
val load : string -> Images.load_option list -> Images.t
val save :
string ->
Images.format option -> Images.save_option list -> Images.t -> unit
val load_sequence : string -> Images.load_option list -> Images.sequence
val save_sequence :
string ->
Images.format option ->
Images.save_option list -> Images.sequence -> unit
val unoptimize_sequence : Images.sequence -> Images.sequence
val size : Images.t -> int * int
val destroy : Images.t -> unit
val sub : Images.t -> int -> int -> int -> int -> Images.t
val blit :
Images.t -> int -> int -> Images.t -> int -> int -> int -> int -> unit
val blocks : Images.t -> int * int
end