diff --git a/.last_go_version b/.last_go_version index 997840de7..d6c25788b 100644 --- a/.last_go_version +++ b/.last_go_version @@ -1 +1 @@ -6g version weekly.2011-09-07 9728 +6g version weekly.2011-09-07 9772+ diff --git a/lib/go/camli/misc/resize/resize.go b/lib/go/camli/misc/resize/resize.go index 444684ca3..2fc005dea 100644 --- a/lib/go/camli/misc/resize/resize.go +++ b/lib/go/camli/misc/resize/resize.go @@ -16,7 +16,7 @@ func Resize(m image.Image, r image.Rectangle, w, h int) image.Image { return nil } if w == 0 || h == 0 || r.Dx() <= 0 || r.Dy() <= 0 { - return image.NewRGBA64(w, h) + return image.NewRGBA64(image.Rect(0, 0, w, h)) } switch m := m.(type) { case *image.RGBA: @@ -98,7 +98,7 @@ func Resize(m image.Image, r image.Rectangle, w, h int) image.Image { // average convert the sums to averages and returns the result. func average(sum []uint64, w, h int, n uint64) image.Image { - ret := image.NewRGBA(w, h) + ret := image.NewRGBA(image.Rect(0, 0, w, h)) for y := 0; y < h; y++ { for x := 0; x < w; x++ { i := y*ret.Stride + x*4 @@ -225,10 +225,10 @@ func Resample(m image.Image, r image.Rectangle, w, h int) image.Image { return nil } if w == 0 || h == 0 || r.Dx() <= 0 || r.Dy() <= 0 { - return image.NewRGBA64(w, h) + return image.NewRGBA64(image.Rect(0, 0, w, h)) } curw, curh := r.Dx(), r.Dy() - img := image.NewRGBA(w, h) + img := image.NewRGBA(image.Rect(0, 0, w, h)) for y := 0; y < h; y++ { for x := 0; x < w; x++ { // Get a source pixel.