webp.go 1.3 KB

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