mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-26 21:36:24 +02:00
update all vendored dependencies
This commit is contained in:
parent
0c20cbe5b5
commit
1933f5bf1c
284 changed files with 37534 additions and 11024 deletions
8
vendor/github.com/disintegration/imaging/tools.go
generated
vendored
8
vendor/github.com/disintegration/imaging/tools.go
generated
vendored
|
|
@ -136,11 +136,11 @@ func PasteCenter(background, img image.Image) *image.NRGBA {
|
|||
//
|
||||
// Usage examples:
|
||||
//
|
||||
// // draw the sprite over the background at position (50, 50)
|
||||
// dstImage := imaging.Overlay(backgroundImage, spriteImage, image.Pt(50, 50), 1.0)
|
||||
// // 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)
|
||||
// // blend two opaque images of the same size
|
||||
// dstImage := imaging.Overlay(imageOne, imageTwo, image.Pt(0, 0), 0.5)
|
||||
//
|
||||
func Overlay(background, img image.Image, pos image.Point, opacity float64) *image.NRGBA {
|
||||
opacity = math.Min(math.Max(opacity, 0.0), 1.0) // check: 0.0 <= opacity <= 1.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue