Skip to content

Latest commit

 

History

History

tutorials

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Getting Started - Examples

Be sure to include the following for the functions below

from blendmodes.blend import blendLayers, BlendType

background = Image.open(THISDIR + "/background.png")
foreground = Image.open(THISDIR + "/foreground.png")

Normal

blendLayers(background, foreground, BlendType.NORMAL)

Normal

Multiply

blendLayers(background, foreground, BlendType.MULTIPLY)

Multiply

Additive

blendLayers(background, foreground, BlendType.ADDITIVE)

Additive

ColourBurn

blendLayers(background, foreground, BlendType.COLOURBURN)

ColourBurn

ColourDodge

blendLayers(background, foreground, BlendType.COLOURDODGE)

ColourDodge

Reflect

blendLayers(background, foreground, BlendType.REFLECT)

Reflect

Glow

blendLayers(background, foreground, BlendType.GLOW)

Glow

Overlay

blendLayers(background, foreground, BlendType.OVERLAY)

Overlay

Difference

blendLayers(background, foreground, BlendType.DIFFERENCE)

Difference

Negation

blendLayers(background, foreground, BlendType.NEGATION)

Negation

Lighten

blendLayers(background, foreground, BlendType.LIGHTEN)

Lighten

Darken

blendLayers(background, foreground, BlendType.DARKEN)

Darken

Screen

blendLayers(background, foreground, BlendType.SCREEN)

Screen

XOR

blendLayers(background, foreground, BlendType.XOR)

XOR

SoftLight

blendLayers(background, foreground, BlendType.SOFTLIGHT)

SoftLight

HardLight

blendLayers(background, foreground, BlendType.HARDLIGHT)

HardLight

GrainExtract

blendLayers(background, foreground, BlendType.GRAINEXTRACT)

GrainExtract

GrainMerge

blendLayers(background, foreground, BlendType.GRAINMERGE)

GrainMerge

Divide

blendLayers(background, foreground, BlendType.DIVIDE)

Divide

Hue

blendLayers(background, foreground, BlendType.HUE)

Hue

Saturation

blendLayers(background, foreground, BlendType.SATURATION)

Saturation

Colour

blendLayers(background, foreground, BlendType.COLOUR)

Colour

Luminosity

blendLayers(background, foreground, BlendType.LUMINOSITY)

Luminosity

PinLight

blendLayers(background, foreground, BlendType.PINLIGHT)

PinLight

VividLight

blendLayers(background, foreground, BlendType.VIVIDLIGHT)

VividLight

Exclusion

blendLayers(background, foreground, BlendType.EXCLUSION)

Exclusion

DestIn

blendLayers(background, foreground, BlendType.DESTIN)

Exclusion

DestOut

blendLayers(background, foreground, BlendType.DESTOUT)

Exclusion

DestAtop

blendLayers(background, foreground, BlendType.DESTATOP)

Exclusion

SrcAtop

blendLayers(background, foreground, BlendType.SRCATOP)

Exclusion