func NewAtFunc(p image.Image) AtFunc {
	switch p := p.(type) {
	case *image.RGBA:
		return newAtFuncRGBA(p)
	case *image.RGBA64:
		return newAtFuncRGBA64(p)
	case *image.NRGBA:
		return newAtFuncNRGBA(p)
	case *image.NRGBA64:
		return newAtFuncNRGBA64(p)
	case *image.Alpha:
		return newAtFuncAlpha(p)
	case *image.Alpha16:
		return newAtFuncAlpha16(p)
	case *image.Gray:
		return newAtFuncGray(p)
	case *image.Gray16:
		return newAtFuncGray16(p)
	case *image.Paletted:
		return newAtFuncPaletted(p)
	case *image.YCbCr:
		return newAtFuncYCbCr(p)
	case *image.NYCbCrA:
		return newAtFuncNYCbCrA(p)
	case *image.CMYK:
		return newAtFuncCMYK(p)
	case *image.Uniform:
		return newAtFuncUniform(p)
	default:
		return newAtFuncDefault(p)
	}
}
NewAtFunc returns an AtFunc for an Image.

nolint: gocyclo
package imageutil
import "image"
type AtFunc func(x, y int) (r, g, b, a uint32)