doc.go 675 B

12345678910111213141516171819202122232425
  1. // Copyright 2012 The Graphics-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. /*
  5. Package interp implements image interpolation.
  6. An interpolator provides the Interp interface, which can be used
  7. to interpolate a pixel:
  8. c := interp.Bilinear.Interp(src, 1.2, 1.8)
  9. To interpolate a large number of RGBA or Gray pixels, an implementation
  10. may provide a fast-path by implementing the RGBA or Gray interfaces.
  11. i1, ok := i.(interp.RGBA)
  12. if ok {
  13. c := i1.RGBA(src, 1.2, 1.8)
  14. // use c.R, c.G, etc
  15. return
  16. }
  17. c := i.Interp(src, 1.2, 1.8)
  18. // use generic color.Color
  19. */
  20. package interp