Package blend implements blending mode functions bewteen images, and some utility functions for image processing.
The fundamental part of the library is the type BlendFunc, the function is applied to each pixel where the top layer (src) overlaps the bottom layer (dst) of both given 'image' interfaces.
This library provides many of the widely used blending functions to be used either as 'mode' parameter to the Blend() primary function, or to be used individually providing two 'color' interfaces. You can implement your own blending modes and pass them into the Blend() function.
This is the list of the currently implemented blending modes:
Add, Color, Color Burn, Color Dodge, Darken, Darker Color, Difference, Divide, Exclusion, Hard Light, Hard Mix, Hue, Lighten, Lighter Color, Linear Burn, Linear Dodge, Linear Light, Luminosity, Multiply, Overlay, Phoenix, Pin Light, Reflex, Saturation, Screen, Soft Light, Substract, Vivid Light.
Check github for more details: http://github.com/phrozen/blend
Blends src image (top layer) into dst image (bottom layer) using the BlendFunc provided by mode. BlendFunc is applied to each pixel where the src image overlaps the dst image and the result is stored in the original dst image, src image is unmutable.
Blends src image (top layer) into dst image (bottom layer) using the BlendFunc provided by mode. BlendFunc is applied to each pixel where the src image overlaps the dst image and returns the resulting image without modifying src, or dst as they are both unmutable.
A blend function or blend mode receives a destination color and a source color, then returns a transformation of them. Blend() function receives a BlendFunc and applies it to every pixel in the overlaping areas of two given images.
var ( Add BlendFunc Color BlendFunc ColorBurn BlendFunc ColorDodge BlendFunc Darken BlendFunc DarkerColor BlendFunc Difference BlendFunc Divide BlendFunc Exclusion BlendFunc HardLight BlendFunc HardMix BlendFunc Hue BlendFunc Lighten BlendFunc LighterColor BlendFunc LinearBurn BlendFunc LinearDodge BlendFunc LinearLight BlendFunc Luminosity BlendFunc Multiply BlendFunc Overlay BlendFunc Phoenix BlendFunc PinLight BlendFunc Reflex BlendFunc Saturation BlendFunc Screen BlendFunc SoftLight BlendFunc Substract BlendFunc VividLight BlendFunc )
Work in progress.
Work in progress.