Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Bimage.ImageSourceThe Image module defines a simple interface for manipulating image data
Image type
create kind color width height makes a new image with the given kind, color and dimensions
of_data color width height layout data makes a new image from existing image data with the given kind, color, layout, and dimensions
like img creates a new image with the same dimensions, color and kind as img
Copy pixels from one image to another
Convert an image to an existing image of another kind
Convert an image to a new image of another kind
Convert from any color to the given color
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 float value at (x, y, c)
Set a single channel of the given image at (x, y) using a float value
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.
Apply a kernel directly to the provided image. Note that this implementation is much slower than `Op.kernel`, it is mostly provided for convenience
val avg :
?x:int ->
?y:int ->
?width:int ->
?height:int ->
('a, 'b, 'c) t ->
(float, f32) Data.tGet the average pixel of an image or region of an image
Convert an image to the given layout
Extract the sub-image specified by the given dimensions
Calculate the mean and standard deviation of an image