package camlimages

  1. Overview
  2. Docs

Color blending. Inspired from the implementation of Ghostscript

type mode =
  1. | Normal
  2. | Multiply
  3. | Screen
  4. | Overlay
  5. | ColorDodge
  6. | ColorBurn
  7. | Darken
  8. | Lighten
  9. | Difference
  10. | Exclusion
val blend : mode -> int -> int -> int

blend blendmode src dst computes blending of one color component.

val f : mode -> int -> Color.rgb -> Color.rgb -> Color.rgb

f blendmode srcalpha src dst 8bit depth .

bug: no destination alpha support.

OCaml

Innovation. Community. Security.