aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/image/jpeg/writer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/image/jpeg/writer_test.go')
-rw-r--r--libgo/go/image/jpeg/writer_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libgo/go/image/jpeg/writer_test.go b/libgo/go/image/jpeg/writer_test.go
index 7aec70f..0378252 100644
--- a/libgo/go/image/jpeg/writer_test.go
+++ b/libgo/go/image/jpeg/writer_test.go
@@ -7,6 +7,7 @@ package jpeg
import (
"bytes"
"image"
+ "image/color"
"image/png"
"io/ioutil"
"rand"
@@ -90,13 +91,13 @@ func TestWriter(t *testing.T) {
func BenchmarkEncodeRGBOpaque(b *testing.B) {
b.StopTimer()
- img := image.NewRGBA(640, 480)
+ img := image.NewRGBA(image.Rect(0, 0, 640, 480))
// Set all pixels to 0xFF alpha to force opaque mode.
bo := img.Bounds()
rnd := rand.New(rand.NewSource(123))
for y := bo.Min.Y; y < bo.Max.Y; y++ {
for x := bo.Min.X; x < bo.Max.X; x++ {
- img.Set(x, y, image.RGBAColor{
+ img.Set(x, y, color.RGBA{
uint8(rnd.Intn(256)),
uint8(rnd.Intn(256)),
uint8(rnd.Intn(256)),