Description

Overlay draws the img image over the background image at given position and returns the combined image. Opacity parameter is the opacity of the img image layer, used to compose the images, it must be from 0.0 to 1.0.

Usage examples:

// draw the sprite over the background at position (50, 50)
dstImage := imaging.Overlay(backgroundImage, spriteImage, image.Pt(50, 50), 1.0)

// blend two opaque images of the same size
dstImage := imaging.Overlay(imageOne, imageTwo, image.Pt(0, 0), 0.5)

Overlay is referenced in 7 repositories

github.com/disintegration/imaging github.com/katekligman/imagecompare github.com/azr/phash

...