// TestOpenImage checks that a JPG can be opened.
TestOpenImage checks that a JPG can be opened.
// TestOpenImage checks that a JPG can be opened .
func TestOpenImage(t *testing.T) {
	m, title, err := LoadImage(getResource("pixel.jpg"))
	if err != nil {
		t.Fatalf(`err = %v, want nil`, err)
	}
	if want := "pixel.jpg [jpeg]"; title != want {
		t.Errorf(`title = %q, want %q`, title, want)
	}
	pixel := m.At(0, 0)
	r, g, b, a := pixel.RGBA()
	wantColor := color.White
	wr, wg, wb, wa := wantColor.RGBA()
	if r != wr || g != wg || b != wb || a != wa {
		t.Errorf(`pixel = %#v, want white (%#v)`, pixel, wantColor)
	}
}
func TestOpenImage ( t * testing . T ) { m , title , err := LoadImage ( getResource ( " " ) ) if err != nil { t . Fatalf ( `err = %v, want nil` , err ) } if want := " " ; title != want { t . Errorf ( `title = %q, want %q` , title , want ) } pixel := m . At ( 0 , 0 ) r , g , b , a := pixel . RGBA ( ) wantColor := color . White wr , wg , wb , wa := wantColor . RGBA ( ) if r != wr || g != wg || b != wb || a != wa { t . Errorf ( `pixel = %#v, want white (%#v)` , pixel , wantColor ) } }
TestOpenImage checks that a JPG can be opened.
TestOpenImage checks that a JPG can be opened .