Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Bimage.ImageSourceImage defines an image type and functions that manipulate images directly
Image type
v ty color width height makes a new image with the given ty, color and dimensions
of_data color width height data makes a new image from existing image data with the given ty, color, and dimensions
like img creates a new image with the same dimensions, color and ty as img
Create an image with the same dimensions and type
Create an image with the name dimensions and color
Copy pixels from one image to another
Convert an image to an existing image of another ty
Convert an image to a new image of another ty
get image x y c returns a the value at (x, y, c)
Set a single channel of the given image at (x, y)
get_f image x y c returns the normalized float value at (x, y, c)
Set a single channel of the given image at (x, y) using a normalized float value
get_pixel image x y returns a pixel representation of image data at (x, y)
set_pixel image x y px sets the value of image at (x, y) to px
get_data image x y returns image data at (x, y)
set_data image x y px sets the value of image at (x, y) to px
val for_each :
(int -> int -> ('a, 'b) Data.t -> unit) ->
?x:int ->
?y:int ->
?width:int ->
?height:int ->
('a, 'b, 'c) t ->
unitIterate over each pixel in an image, or a rectangle segment of an image specified by x, y, width, and height. The data segment used in the callback is mutable and will write directly to the underlying image data.
val for_each_pixel :
(int -> int -> 'c Pixel.t -> unit) ->
?x:int ->
?y:int ->
?width:int ->
?height:int ->
('a, 'b, 'c) t ->
unitIterate over each pixel in an image
val avg :
?x:int ->
?y:int ->
?width:int ->
?height:int ->
('a, 'b, 'c) t ->
(float, Type.f64) Data.tGet the average pixel of an image or region of an image
Extract the sub-image specified by the given dimensions
Calculate the mean and standard deviation of an image