module Mgk:sig..end
Interface for image-magick commands
type t
holds the command in progress
val new_genesis : unit -> tinitialise the command for a set of operations
val input_image : string -> t -> unitfilename of an image to load
val set_size : wh:int * int -> t -> unitset dimensions of an image, a canvas, or a layer
val init_canvas : string -> t -> unityou can initialise a transparent image with: "canvas:none"
val set_filename : string -> t -> unitset the filename of the image containing the result
val write_command : t -> unitoutput the resulting command on stdout to produce the requested operations
draw commands
val draw_line : int * int -> int * int -> t -> unitdraw operation with a line command
val draw_point : int * int -> t -> unitdraw operation with a point command
val draw_rectangle : int * int -> int * int -> t -> unitdraw operation with a rectangle command
val draw_circle : int * int -> int -> t -> unitdraw operation with a circle command
val draw_ellipse : int * int -> int * int -> t -> unitdraw operation with a ellipse command
val draw_qbcurve : int * int -> int * int -> int * int -> t -> unitdraw operation with a quadratic bezier curve command
val draw_cbcurve : int * int -> int * int -> int * int -> int * int -> t -> unitdraw operation with a cubic bezier curve command
val draw_polygon : (int * int) list -> t -> unitdraw operation with a rectangle command
val draw_text : int * int -> string -> t -> unitdraw operation with a text command
val set_font : string -> t -> unitset the font for the draw-text operation
val set_pointsize : int -> t -> unitset the size of the text in points
val set_strokewidth : float -> t -> unitset the stroke-width for the draw operations
val set_fill : string -> t -> unitset the fill color for the draw operations
val set_stroke : string -> t -> unitset the stroke color for the draw operations
combine different layers
typecomp_op =string
composite operator
val over : comp_op
val multiply : comp_op
val screen : comp_op
val overlay : comp_op
val darken : comp_op
val lighten : comp_op
val add : comp_op
val subtract : comp_opmost common composite operators
val compositeop_of_string : string -> comp_opget a composite operator parameter from a string (read the image-magick documentation for a list of composite-operators)
val set_composite_op : comp_op -> t -> unitselect a composite operator
val composite : t -> unitcomposite operation
val open_layer : (t -> unit) -> t -> unitopen a new layer
val set_geometry : int * int -> t -> unitsets the position for the composition of a layer
val negate : t -> unit
val blur : int -> t -> unit
val normalize : t -> unit
val shade : int * int -> t -> unit
val modulate : int * int * int -> t -> unitmodulate, with brightness, saturation, hue parameters