code: func Crop(img image.Image, rect image.Rectangle) *image.NRGBA {
  	r := rect.Intersect(img.Bounds()).Sub(img.Bounds().Min)
  	if r.Empty() {
  		return &image.NRGBA{}
  	}
  	src := newScanner(img)
  	dst := image.NewNRGBA(image.Rect(0, 0, r.Dx(), r.Dy()))
  	rowSize := r.Dx() * 4
  	parallel(r.Min.Y, r.Max.Y, func(ys <-chan int) {
  		for y := range ys {
  			i := (y - r.Min.Y) * dst.Stride
  			src.scan(r.Min.X, y, r.Max.X, y+1, dst.Pix[i:i+rowSize])
  		}
  	})
  	return dst
  }
docs: // Crop cuts out a rectangular region with the specified bounds
  // from the image and returns the cropped image.