update all downstream dependencies

no specific features I'm looking to add, just keeping thing up to date.
Unit tests and my manual testing seems like everything is still working
as expected.
This commit is contained in:
Will Norris 2017-06-01 08:37:05 -07:00
parent 17f19d612f
commit b5984d2822
25 changed files with 1661 additions and 486 deletions

View file

@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package webp implements a decoder for WEBP images.
//
// WEBP is defined at:
// https://developers.google.com/speed/webp/docs/riff_container
package webp // import "golang.org/x/image/webp"
// +build go1.6
package webp
import (
"bytes"
@ -18,7 +16,6 @@ import (
"golang.org/x/image/riff"
"golang.org/x/image/vp8"
"golang.org/x/image/vp8l"
"golang.org/x/image/webp/nycbcra"
)
var errInvalidFormat = errors.New("webp: invalid format")
@ -98,7 +95,7 @@ func decode(r io.Reader, configOnly bool) (image.Image, image.Config, error) {
return nil, image.Config{}, err
}
if alpha != nil {
return &nycbcra.Image{
return &image.NYCbCrA{
YCbCr: *m,
A: alpha,
AStride: alphaStride,
@ -138,7 +135,7 @@ func decode(r io.Reader, configOnly bool) (image.Image, image.Config, error) {
heightMinusOne = uint32(buf[7]) | uint32(buf[8])<<8 | uint32(buf[9])<<16
if configOnly {
return nil, image.Config{
ColorModel: nycbcra.ColorModel,
ColorModel: color.NYCbCrAModel,
Width: int(widthMinusOne) + 1,
Height: int(heightMinusOne) + 1,
}, nil

View file

@ -4,6 +4,9 @@
// Package nycbcra provides non-alpha-premultiplied Y'CbCr-with-alpha image and
// color types.
//
// Deprecated: as of Go 1.6. Use the standard image and image/color packages
// instead.
package nycbcra // import "golang.org/x/image/webp/nycbcra"
import (
@ -11,6 +14,11 @@ import (
"image/color"
)
func init() {
println("The golang.org/x/image/webp/nycbcra package is deprecated, as of Go 1.6. " +
"Use the standard image and image/color packages instead.")
}
// TODO: move this to the standard image and image/color packages, so that the
// image/draw package can have fast-path code. Moving would rename:
// nycbcra.Color to color.NYCbCrA

30
vendor/golang.org/x/image/webp/webp.go generated vendored Normal file
View file

@ -0,0 +1,30 @@
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package webp implements a decoder for WEBP images.
//
// WEBP is defined at:
// https://developers.google.com/speed/webp/docs/riff_container
//
// It requires Go 1.6 or later.
package webp // import "golang.org/x/image/webp"
// This blank Go file, other than the package clause, exists so that this
// package can be built for Go 1.5 and earlier. (The other files in this
// package are all marked "+build go1.6" for the NYCbCrA types introduced in Go
// 1.6). There is no functionality in a blank package, but some image
// manipulation programs might still underscore import this package for the
// side effect of registering the WEBP format with the standard library's
// image.RegisterFormat and image.Decode functions. For example, that program
// might contain:
//
// // Underscore imports to register some formats for image.Decode.
// import _ "image/gif"
// import _ "image/jpeg"
// import _ "image/png"
// import _ "golang.org/x/image/webp"
//
// Such a program will still compile for Go 1.5 (due to this placeholder Go
// file). It will simply not be able to recognize and decode WEBP (but still
// handle GIF, JPEG and PNG).