package bimage

  1. Overview
  2. Docs

Module Bimage.PixelSource

Pixels are float vectors used to store normalized image data

Sourcetype t
Sourceval empty : int -> t

Create a new pixel with all channels set to 0

Sourceval length : t -> int

Get the number of channels in a pixel

Sourceval compare : t -> t -> int
Sourceval equal : t -> t -> bool
Sourceval from_data : ('a, 'b) Data.t -> t

Create a new pixel from existing image data

Sourceval to_data : dest:('a, 'b) Data.t -> t -> unit

Copy pixel data to existing image data

Sourceval data : t -> (float, f32) Data.t

Returns the underlying pixel data

Sourceval rgb_to_xyz : t -> t

Convert pixel from RGB to XYZ

Sourceval rgb_to_yuv : t -> t

Convert pixel from RGB to YUV

Sourceval map : (float -> float) -> t -> t

map f x executes f for each value in x, returning a new Pixel.t

Sourceval map_inplace : (float -> float) -> t -> unit

map_inplace f x executes f for each value in x, assigning the new value to the same * index

Sourceval map2 : (float -> float -> float) -> t -> t -> t

map f x executes f for each value in x, returning a new Pixel.t

Sourceval map2_inplace : (float -> float -> float) -> t -> t -> unit

map_inplace f x executes f for each value in x, assigning the new value to the same * index

Sourceval fold : (float -> 'a -> 'a) -> t -> 'a -> 'a

Reduction over a pixel

Sourceval fold2 : (float -> float -> 'a -> 'a) -> t -> t -> 'a -> 'a

Reduction over two pixels

Sourceval pp : Format.formatter -> t -> unit
OCaml

Innovation. Community. Security.