vendor: Mega update all dependencies
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4080
This commit is contained in:
11
vendor/github.com/vitrun/qart/qr/resize.go
generated
vendored
11
vendor/github.com/vitrun/qart/qr/resize.go
generated
vendored
@@ -1,8 +1,8 @@
|
||||
package qr
|
||||
|
||||
import (
|
||||
"image"
|
||||
"image/color"
|
||||
"image"
|
||||
"image/color"
|
||||
)
|
||||
|
||||
// average convert the sums to averages and returns the result.
|
||||
@@ -21,6 +21,7 @@ func average(sum []uint64, w, h int, n uint64) *image.RGBA {
|
||||
return ret
|
||||
}
|
||||
|
||||
|
||||
// ResizeRGBA returns a scaled copy of the RGBA image slice r of m.
|
||||
// The returned image has width w and height h.
|
||||
func ResizeRGBA(m *image.RGBA, r image.Rectangle, w, h int) *image.RGBA {
|
||||
@@ -69,6 +70,7 @@ func ResizeRGBA(m *image.RGBA, r image.Rectangle, w, h int) *image.RGBA {
|
||||
return average(sum, w, h, (uint64)(n))
|
||||
}
|
||||
|
||||
|
||||
// ResizeNRGBA returns a scaled copy of the RGBA image slice r of m.
|
||||
// The returned image has width w and height h.
|
||||
func ResizeNRGBA(m *image.NRGBA, r image.Rectangle, w, h int) *image.RGBA {
|
||||
@@ -142,7 +144,8 @@ func Resample(m image.Image, r image.Rectangle, w, h int) *image.RGBA {
|
||||
b := uint8(b32 >> 8)
|
||||
a := uint8(a32 >> 8)
|
||||
img.SetRGBA(x, y, color.RGBA{r, g, b, a})
|
||||
}
|
||||
}
|
||||
return img
|
||||
}
|
||||
return img
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user