webp: fix tests for webp/nycbcra deprecation.
The previous commit (00fe24ef
"webp/nycbcra: deprecate package") was
incomplete.
Change-Id: I6af5e1633b9c291e72b02877b308eae6e5624ef5
Reviewed-on: https://go-review.googlesource.com/21441
Reviewed-by: Nigel Tao <nigeltao@golang.org>
This commit is contained in:
parent
00fe24ef7b
commit
0ebebfd658
|
@ -26,7 +26,6 @@ import (
|
|||
"strings"
|
||||
|
||||
"golang.org/x/image/webp"
|
||||
"golang.org/x/image/webp/nycbcra"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -161,12 +160,12 @@ func encodePAM(gotImage image.Image) ([]byte, error) {
|
|||
func encodePGM(gotImage image.Image) ([]byte, error) {
|
||||
var (
|
||||
m *image.YCbCr
|
||||
ma *nycbcra.Image
|
||||
ma *image.NYCbCrA
|
||||
)
|
||||
switch g := gotImage.(type) {
|
||||
case *image.YCbCr:
|
||||
m = g
|
||||
case *nycbcra.Image:
|
||||
case *image.NYCbCrA:
|
||||
m = &g.YCbCr
|
||||
ma = g
|
||||
default:
|
||||
|
|
|
@ -13,8 +13,6 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/image/webp/nycbcra"
|
||||
)
|
||||
|
||||
// hex is like fmt.Sprintf("% x", x) but also inserts dots every 16 bytes, to
|
||||
|
@ -54,11 +52,11 @@ func testDecodeLossy(t *testing.T, tc string, withAlpha bool) {
|
|||
|
||||
var (
|
||||
m0 *image.YCbCr
|
||||
a0 *nycbcra.Image
|
||||
a0 *image.NYCbCrA
|
||||
ok bool
|
||||
)
|
||||
if withAlpha {
|
||||
a0, ok = img0.(*nycbcra.Image)
|
||||
a0, ok = img0.(*image.NYCbCrA)
|
||||
if ok {
|
||||
m0 = &a0.YCbCr
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user