package bimage

  1. Overview
  2. Docs

Module Bimage.ColorSource

Color contains methods for creating and inspecting color types

Sourcemodule type COLOR = sig ... end
Sourcemodule Rgb : COLOR with type t = [ `Rgb ]

Color contains methods for creating and inspecting color types

Sourcemodule Rgba : COLOR with type t = [ `Rgba ]
Sourcemodule Gray : COLOR with type t = [ `Gray ]
Sourcemodule Xyz : COLOR with type t = [ `Xyz ]
Sourcemodule Yuv : COLOR with type t = [ `Yuv ]
Sourcetype 'a t = (module COLOR with type t = 'a)

Used to specify the color model of an image

Sourceval name : 'a t -> string
Sourceval has_alpha : 'a t -> bool

Returns true if the color has an alpha channel

Sourceval channels : 'a t -> int

Returns the number of channels for a color

Sourceval alpha_channel : 'a t -> int option

Returns the index of the alpha channel if available

Sourcetype gray = [
  1. | `Gray
]

1-channels gray color type

Sourcetype rgb = [
  1. | `Rgb
]

3-channel RGB color type

Sourcetype xyz = [
  1. | `Xyz
]

3-channel XYZ color type

Sourcetype yuv = [
  1. | `Yuv
]

3-channel YUV color type

Sourcetype rgba = [
  1. | `Rgba
]

4-channel RGBA image

Sourcetype hsv = [
  1. | `Hsv
]

3-channel HSV color type

Sourceval gray : [ `Gray ] t

Gray color

Sourceval rgb : [ `Rgb ] t

RGB color

Sourceval xyz : [ `Xyz ] t

XYZ color

Sourceval yuv : [ `Yuv ] t

YUV color

Sourceval rgba : [ `Rgba ] t

RGBA color

Sourceval hsv : [ `Hsv ] t

HSV color

OCaml

Innovation. Community. Security.